On Mar 17 06:07, Eric Blake wrote: > According to POSIX, creating a hardlink to a symlink is supposed to be > impossible, because link(2) is supposed to resolve symlinks before > performing the actual link. See > http://www.opengroup.org/austin/mailarchives/ag/msg08153.html.
Regardless of this mail exchange, the ultimate word on this is the SUSv3 man page, which shows no trace of demanding that link(2) follows symlinks, see http://www.opengroup.org/onlinepubs/009695399/functions/link.html > $ ln -s a b > $ link b c # Bug: c should be a hard link to a, not b > $ ls -l a b c > - -rw-r--r-- 1 eblake None 0 Mar 15 19:04 a > lrwxrwxrwx 2 eblake None 1 Mar 15 19:04 b -> a > lrwxrwxrwx 2 eblake None 1 Mar 15 19:04 c -> a Ok, let's try this on Linux: $ uname -sr Linux 2.6.11 $ rpm -q coreutils coreutils-5.2.1-1 $ touch a $ ln -s a b $ link b c $ ls -l a b c -rw-r--r-- 1 corinna users 0 2005-03-17 16:56 a lrwxrwxrwx 2 corinna users 1 2005-03-17 16:56 b -> a lrwxrwxrwx 2 corinna users 1 2005-03-17 16:56 c -> a Same if I use ln(1) instead of link(1). So? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin@cygwin.com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/