X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-ID: <4C6C7DED.40509@gmail.com> Date: Wed, 18 Aug 2010 17:42:21 -0700 From: Daniel Colascione User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: "run" changes behavior with cygwin-17.6 References: <20100818185421 DOT GC22698 AT ednor DOT casa DOT cgf DOT cx> <20100818191340 DOT GB11340 AT calimero DOT vinschen DOT de> <20100818191906 DOT GD22698 AT ednor DOT casa DOT cgf DOT cx> <20100818192238 DOT GA27567 AT ednor DOT casa DOT cgf DOT cx> <20100818193446 DOT GC11340 AT calimero DOT vinschen DOT de> <20100818193940 DOT GA4358 AT ednor DOT casa DOT cgf DOT cx> <20100818195546 DOT GF11340 AT calimero DOT vinschen DOT de> <4C6C3B15 DOT 2000605 AT redhat DOT com> <20100818201921 DOT GI11340 AT calimero DOT vinschen DOT de> In-Reply-To: <20100818201921.GI11340@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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