This is the mail archive of the cygwin 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: "run" changes behavior with cygwin-17.6


On 8/18/10 1:19 PM, Corinna Vinschen wrote:
>> POSIX allows the refusal to delete an in-use directory; and Solaris NFS
>> mounts behave this way.

What about renaming directories though? (Damn this tight coupling
Windows has between files and filenames.)

>>  But since Linux can delete in-use directories

Not just Linux -- OS X and the other BSDs too, presumably, allow
renaming and deleting directories that are the CWD of some process.

>> (where an in-use directory includes the condition of at least one
>> process owning that directory as its cwd), and cygwin emulates Linux
>> rather than POSIX, we can try harder if it makes sense.
> 
> That lets me more tend to 3 now (cgf's idea to defer until the first
> chdir).  I'm still chewing nails, though.

IMVHO, #1 is the right choice. It's a lot less surprising than #3, and
it fails safe. It's a very simple model: "relative filename use will
fail unless you do something special, and by doing something special,
you signify that you understand the magic." I can imagine #3 causing
subtle bugs in programs that only chdir() sometimes.

Using Win32 functions in a Cygwin program already requires extra
knowledge; adding CWD tracking doesn't hurt much.

The other crazy idea would be to override the Win32 file and path
functions and handle the notion of a current directory entirely within
Cygwin for both Win32 and Cygwin functions, but IIRC, playing games with
Windows API functions was explicitly rejected a while ago.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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