This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Hard links broken?


You've got something else going on. I, too, am running Cygwin 1.3.17 ('cause of my other problems with 1.3.18) and hard links work fine for me.

I assume you are using an NTFS file system, right? FAT file systems don't support hard links.

I have noticed that Cygwin's link code falls back to copying for more reasons than just lack of support for hard links in the underlying file system. If I knew more about what variety of failures in attempting to create a hard link will cause Cygwin to fall back to copying the file, I'd tell you, but I just remember seeing other things do it.

What are the ownership and permissions of the directory in which the files involved reside? How do they relate to the user (id) making the attempt?

Randall Schulz

P.S. Nicolas, please subscribe to the list, at least for as long it takes to get this issue resolved.

At 20:29 2002-12-27, Nicolas Williams wrote:

So, I upgraded to Cygwin 1.3.17-1 this weekend and mutt started behaving
oddly (I upgraded mutt as well). My laptop runs Windows XP (SP1).

The behaviour is this: it fails to lock the mail spools and thinks some
other process has the spools locked and prompts me as to whether to
remove the lock files after timing out.

Besides being very obnoxious this behaviour is very obnoxious.

So I straced mutt and the problem appears to be that the call to link()
a file to the lock file name fails, but it does actually copy the file.

So, I did this:

% touch foobar
% ln foobar foobar.lock
% ls -li foobar foobar.lock
3893364076 -rw-r--r-- 1 myuser None 0 Dec 27 22:09 foobar
3895124156 -rw-r--r-- 1 myuser None 0 Dec 27 22:09 foobar.lock

So hard links don't work now.

Here's a snippet from the strace output:

(first the spoolfile.<user>.<pid> is created)
118 2609558 [main] mutt 4024 normalize_posix_path: src myuser.lock
111 2609669 [main] mutt 4024 cwdstuff::get: (/var/spool/mail) = cwdstuff::get (0x22DB38, 260, 1, 0
), errno 2
500 2610169 [main] mutt 4024 symlink_info::check: not a symlink
77 2610246 [main] mutt 4024 symlink_info::check: 0 = symlink.check (C:\cygwin\var\spool\mail\myuser
.lock, 0x22D7F8) (0xA)
115 2610361 [main] mutt 4024 link: file 'C:\cygwin\var\spool\mail\myuser.lock' exists?
63 2610424 [main] mutt 4024 link: -1 = link (myuser.MYUSER.4024, myuser.lock)

But, before mutt gets to this point the lock file (myuser.lock) does not
exist, and yet it exists from that point forward.

Should I install and earlier Cygwin release? How should I do that?


PS: I'm not on the list.

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]