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

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.

> echo >a
> ln -s a b
> ln b c
ls -l a b c
-rw-rw-rw- 1 bruce bruce 0 Dec 22 15:22 a
lrwxrwxrwx 2 bruce bruce 1 Dec 22 15:22 b -> a
lrwxrwxrwx 2 bruce bruce 1 Dec 22 15:22 c -> a
> rm a c
> ln b c
ln: b: No such file or directory

This was reported to me by Richard Stallman. We are both running Debian systems,
I verified that this was a feature of kernel 2.0.27 and not our "ln" executable.

Thanks

Bruce Perens
--
Bruce Perens K6BP Bruce@Pixar.com
Finger bruce@master.Debian.org for PGP public key.
PGP fingerprint = 88 6A 15 D0 65 D4 A3 A6 1F 89 6A 76 95 24 87 B3

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.361 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site