lkml.org 
[lkml]   [1996]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: link(2) creates hard link to symlink in some cases

> On Sun, 22 Dec 1996, Bruce Perens wrote:
> > Under 2.0.27, link(2) creates a hard link to a symlink,
> > but only if the target of the symlink exists. This can't
> > be the intended behavior.
>
> From: Mark Hemment <markhe@nextd.demon.co.uk>
> > It may have been the intended behaviour, but it's certainly the wrong
> > behaviour. I test on both SCO's OpenServer, and UnixWare 2.1. Both
> > followed the symlink for link(2). Not sure what a BSD derived system does...

FreeBSD 2.1.5 link() follows symlinks.
Solaris 2.5 does not.

So it seems not so clear which behavior is more correct. Maybe ln
should be patched instead. BTW, what about cross-filesystem symlinks
and symlinks to non-existent files?

\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2011 Jasper Spaans