Re: "run" changes behavior with cygwin-17.6

2010-08-19 Thread Christopher Faylor
On Thu, Aug 19, 2010 at 10:33:16AM +0200, Corinna Vinschen wrote: >On Aug 19 02:03, Christopher Faylor wrote: >> On Wed, Aug 18, 2010 at 05:42:21PM -0700, Daniel Colascione wrote: >> >The other crazy idea would be to override the Win32 file and path >> >functions and handle the notion of a current

Re: "run" changes behavior with cygwin-17.6

2010-08-19 Thread Corinna Vinschen
On Aug 19 09:20, Charles Wilson wrote: > On 8/19/2010 6:48 AM, Corinna Vinschen wrote: > > I applied the patch which adds the CW_SYNC_WINCWD code and I updated > > the documentation accordingly. > > > > I uploaded the rewritten chapter about using the Win32 file API here: > > > > http://cygwin.

Re: "run" changes behavior with cygwin-17.6

2010-08-19 Thread Charles Wilson
On 8/19/2010 6:48 AM, Corinna Vinschen wrote: > I applied the patch which adds the CW_SYNC_WINCWD code and I updated > the documentation accordingly. > > I uploaded the rewritten chapter about using the Win32 file API here: > > http://cygwin.de/cygwin-ug-177/using.html#pathnames-win32-api > >

Re: "run" changes behavior with cygwin-17.6

2010-08-19 Thread Corinna Vinschen
On Aug 18 22:17, Corinna Vinschen wrote: > On Aug 18 15:51, Charles Wilson wrote: > > On 8/18/2010 3:41 PM, Corinna Vinschen wrote: > > > > >Chuck, btw., the function setup_win_environ() in run.c can easily be > > >replaced with `cygwin_internal (CW_SYNC_WINENV);' > > > > Yes, I was just looking

Re: "run" changes behavior with cygwin-17.6

2010-08-19 Thread Corinna Vinschen
On Aug 19 02:03, Christopher Faylor wrote: > On Wed, Aug 18, 2010 at 05:42:21PM -0700, Daniel Colascione wrote: > >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 function

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Christopher Faylor
On Wed, Aug 18, 2010 at 05:42:21PM -0700, Daniel Colascione wrote: >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 functi

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Daniel Colascione
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 direc

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Corinna Vinschen
On Aug 18 13:57, Eric Blake wrote: > On 08/18/2010 01:55 PM, Corinna Vinschen wrote: > >> I'm not convinced such a compromise would be worthwhile, because it > >> would forfeit Linux compatibility while still breaking some > >> Win32-using programs. I think it should be one way or the other: > >> e

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Corinna Vinschen
On Aug 18 15:51, Charles Wilson wrote: > On 8/18/2010 3:41 PM, Corinna Vinschen wrote: > > >Chuck, btw., the function setup_win_environ() in run.c can easily be > >replaced with `cygwin_internal (CW_SYNC_WINENV);' > > Yes, I was just looking at that. I think setup_win_environ (or its > guts befor

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Eric Blake
On 08/18/2010 01:58 PM, Corinna Vinschen wrote: >> Can someone please remind me why you shouldn't change to that directory >> only when SetCurrentDirectory would fail due to a long path, virtual >> path, etc? I think it was covered in the developer list, but I can't find >> it right now. > > It b

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Corinna Vinschen
On Aug 18 14:49, Brian Ford wrote: > On Wed, 18 Aug 2010, Corinna Vinschen wrote: > > > On Aug 18 15:22, Christopher Faylor wrote: > > > On Wed, Aug 18, 2010 at 03:19:06PM -0400, Christopher Faylor wrote: > > > >>already does for the environment. Dropping the environment had roughly > > > >>the s

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Eric Blake
On 08/18/2010 01:55 PM, Corinna Vinschen wrote: >> I'm not convinced such a compromise would be worthwhile, because it >> would forfeit Linux compatibility while still breaking some >> Win32-using programs. I think it should be one way or the other: >> either stick with the current approach, or alw

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Brian Ford
On Wed, 18 Aug 2010, Brian Ford wrote: > Can someone please remind me why you shouldn't change to that directory > only when SetCurrentDirectory would fail due to a long path, virtual > path, etc? I think it was covered in the developer list, but I can't find > it right now. Nevermind, sigh...

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Corinna Vinschen
On Aug 18 20:47, Andy Koppe wrote: > On 18 August 2010 20:39, Christopher Faylor wrote: > > On Wed, Aug 18, 2010 at 09:34:46PM +0200, Corinna Vinschen wrote: > >>On Aug 18 15:22, Christopher Faylor wrote: > >>> On Wed, Aug 18, 2010 at 03:19:06PM -0400, Christopher Faylor wrote: > >>> >>already does

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Charles Wilson
On 8/18/2010 3:41 PM, Corinna Vinschen wrote: Chuck, btw., the function setup_win_environ() in run.c can easily be replaced with `cygwin_internal (CW_SYNC_WINENV);' Yes, I was just looking at that. I think setup_win_environ (or its guts before some early refactoring) pre-dated CW_SYNC_WINENV.

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Brian Ford
On Wed, 18 Aug 2010, Corinna Vinschen wrote: > On Aug 18 15:22, Christopher Faylor wrote: > > On Wed, Aug 18, 2010 at 03:19:06PM -0400, Christopher Faylor wrote: > > >>already does for the environment. Dropping the environment had roughly > > >>the same consequences way back when, after all. > >

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Andy Koppe
On 18 August 2010 20:39, Christopher Faylor wrote: > On Wed, Aug 18, 2010 at 09:34:46PM +0200, Corinna Vinschen wrote: >>On Aug 18 15:22, Christopher Faylor wrote: >>> On Wed, Aug 18, 2010 at 03:19:06PM -0400, Christopher Faylor wrote: >>> >>already does for the environment.  Dropping the environme

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Corinna Vinschen
On Aug 18 21:34, Corinna Vinschen wrote: > On Aug 18 15:22, Christopher Faylor wrote: > > On Wed, Aug 18, 2010 at 03:19:06PM -0400, Christopher Faylor wrote: > > >>already does for the environment. Dropping the environment had roughly > > >>the same consequences way back when, after all. > > > > >

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Christopher Faylor
On Wed, Aug 18, 2010 at 09:34:46PM +0200, Corinna Vinschen wrote: >On Aug 18 15:22, Christopher Faylor wrote: >> On Wed, Aug 18, 2010 at 03:19:06PM -0400, Christopher Faylor wrote: >> >>already does for the environment. Dropping the environment had roughly >> >>the same consequences way back when,

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Corinna Vinschen
On Aug 18 15:19, Christopher Faylor wrote: > On Wed, Aug 18, 2010 at 09:13:40PM +0200, Corinna Vinschen wrote: > >I'm going to add a new call > > > > cygwin_internal (CW_SYNC_WINCWD); > > > >which will do the same for the CWD as > > > > cygwin_internal (CW_SYNC_WINENV); > > Actually I just check

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Corinna Vinschen
On Aug 18 15:22, Christopher Faylor wrote: > On Wed, Aug 18, 2010 at 03:19:06PM -0400, Christopher Faylor wrote: > >>already does for the environment. Dropping the environment had roughly > >>the same consequences way back when, after all. > > > >Except that not every program uses the windows envi

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Christopher Faylor
On Wed, Aug 18, 2010 at 03:19:06PM -0400, Christopher Faylor wrote: >>already does for the environment. Dropping the environment had roughly >>the same consequences way back when, after all. > >Except that not every program uses the windows environment. This affects >quite a few native windows ca

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Christopher Faylor
On Wed, Aug 18, 2010 at 09:13:40PM +0200, Corinna Vinschen wrote: >On Aug 18 14:54, Christopher Faylor wrote: >> On Wed, Aug 18, 2010 at 07:32:40PM +0100, Andy Koppe wrote: >> >On 18 August 2010 19:24, Christopher Faylor wrote: >> >>>I noticed a similar change in cygstart, too. I used to have a scr

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Corinna Vinschen
On Aug 18 14:54, Christopher Faylor wrote: > On Wed, Aug 18, 2010 at 07:32:40PM +0100, Andy Koppe wrote: > >On 18 August 2010 19:24, Christopher Faylor wrote: > >>>I noticed a similar change in cygstart, too. I used to have a script > >>>that would cd to a directory and then run cygstart. After the

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Charles Wilson
On 8/18/2010 2:25 PM, Andy Koppe wrote: Ouch. This might affect even more cygutils. We really should have thought of that. At least there aren't any chdir() calls in any of the cygutils, so it should primarily be a question of setting the Win32 current directory in line with the POSIX one at sta

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Christopher Faylor
On Wed, Aug 18, 2010 at 07:32:40PM +0100, Andy Koppe wrote: >On 18 August 2010 19:24, Christopher Faylor wrote: >>>I noticed a similar change in cygstart, too. I used to have a script >>>that would cd to a directory and then run cygstart. After the upgrade to >>>1.7.6, this stopped working. I had t

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Charles Wilson
On 8/18/2010 1:12 PM, Charles Wilson wrote: On 8/18/2010 11:09 AM, Corinna Vinschen wrote: Looks like the "run" tool now needs a call to CYGWIN_CONV_TO_POSIX_PATH ((get_cwd (), win32_cwd)); and then use win32_cwd in the call to CreateProcess. See http://cygwin.com/cygwin-ug-net/using.html#pat

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Andy Koppe
On 18 August 2010 19:24, Christopher Faylor wrote: >>I noticed a similar change in cygstart, too. I used to have a script >>that would cd to a directory and then run cygstart. After the upgrade to >>1.7.6, this stopped working. I had to use the --directory switch to >>cygstart to get the right beha

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Andy Koppe
On 18 August 2010 18:16, David Rothenberger wrote: > On 8/18/2010 10:12 AM, Charles Wilson wrote: >> On 8/18/2010 11:09 AM, Corinna Vinschen wrote: >>> Looks like the "run" tool now needs a call to >>> >>>    CYGWIN_CONV_TO_POSIX_PATH ((get_cwd (), win32_cwd)); >>> >>> and then use win32_cwd in the

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Christopher Faylor
On Wed, Aug 18, 2010 at 10:16:50AM -0700, David Rothenberger wrote: >On 8/18/2010 10:12 AM, Charles Wilson wrote: >> On 8/18/2010 11:09 AM, Corinna Vinschen wrote: >>> Looks like the "run" tool now needs a call to >>> >>>CYGWIN_CONV_TO_POSIX_PATH ((get_cwd (), win32_cwd)); >>> >>> and then use

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread David Rothenberger
On 8/18/2010 10:12 AM, Charles Wilson wrote: > On 8/18/2010 11:09 AM, Corinna Vinschen wrote: >> Looks like the "run" tool now needs a call to >> >>CYGWIN_CONV_TO_POSIX_PATH ((get_cwd (), win32_cwd)); >> >> and then use win32_cwd in the call to CreateProcess. >> >> See http://cygwin.com/cygwin-

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Charles Wilson
On 8/18/2010 11:09 AM, Corinna Vinschen wrote: Looks like the "run" tool now needs a call to CYGWIN_CONV_TO_POSIX_PATH ((get_cwd (), win32_cwd)); and then use win32_cwd in the call to CreateProcess. See http://cygwin.com/cygwin-ug-net/using.html#pathnames-win32-api Yep. run2 also needs a

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Andy Koppe
On 18 August 2010 15:51, Rodrigo Medina wrote: > After upgrading to cygwin17.6 the program run changes behavior. > For example: > If I start mintty with the followin .bat > >       �...@echo off >        C: >        chdir \cygwin\bin >        run mintty -e '/bin/bash' --login -i >        exit > > I

Re: "run" changes behavior with cygwin-17.6

2010-08-18 Thread Corinna Vinschen
On Aug 18 10:21, Rodrigo Medina wrote: > Hi, > After upgrading to cygwin17.6 the program run changes behavior. > For example: > If I start mintty with the followin .bat > > @echo off > C: > chdir \cygwin\bin > run mintty -e '/bin/bash' --login -i > exit > >

"run" changes behavior with cygwin-17.6

2010-08-18 Thread Rodrigo Medina
Hi, After upgrading to cygwin17.6 the program run changes behavior. For example: If I start mintty with the followin .bat @echo off C: chdir \cygwin\bin run mintty -e '/bin/bash' --login -i exit In the mintty window that is started appears the following mes