Subject: link() is copying on NTFS
From: [email-masked] (Eric Mills)

6 Sep 1997 13:49:26 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
X-Authentication-Warning: sydney.dialix.com.au: osiruucp set sender to sydney!eric using -f
Original-To: [email-masked]
Original-Sender: [email-masked]

On NT4.0sp3 on NTFS filesystem running b18

I MUST be missing some fundamental configuration option but...

It appears as if the link() system call is actually copying the file!
While one has to do that on FAT - NTFS does support multiple names for a
file. This trivial program:

#include <sys/types.h>
#include <sys/stat.h>
main(ac, av)
int	ac;
char	**av;
{
    struct stat	sb;

    if (link(av[1], av[2]) == 0
    && stat(av[2], &sb) == 0) {
	printf("Links = %d\n", sb.st_nlink);
	return 0;
    }
    return 1;
}

prints 1 on gnu-win32 and 2 on UNIX (provided the target does not exist! etc
etc) The new file on gnu-win32 is really different....
The "ln" command is consequently broken as well.

Thanks, Eric Mills.
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".