delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/18/14:55:55

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4C6C2CAB.4030507@cwilson.fastmail.fm>
Date: Wed, 18 Aug 2010 14:55:39 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
Reply-To: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; 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: <380-220108318145158645 AT cantv DOT net> <20100818150920 DOT GY11340 AT calimero DOT vinschen DOT de> <4C6C1490 DOT 3040202 AT cwilson DOT fastmail DOT fm> <4C6C1582 DOT 1080801 AT acm DOT org> <AANLkTikHTN602m6_uoCgbx71NRt-Vqc6XjQizWTx6Lfv AT mail DOT gmail DOT com>
In-Reply-To: <AANLkTikHTN602m6_uoCgbx71NRt-Vqc6XjQizWTx6Lfv@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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/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 startup, in any of the utils that may
> invoke a Win32 function with a relative path. Chuck, do you need a
> hand with going through them?

Oh, riiiiight.

The problem is this: since the win32 CWD is *always* bogus, it is 
possible that other win32 functions will croak, not just CreateProcess. 
  So, there are a number of native win32 calls in the cygutils tools, like:

cygstart: CreateProcess, among others
lpr: ...many...
putclip/getclip: GetClipboardData, SetClipboardData, etc

Now, I haven't tested each of these tools exhaustively under 
cygwin-1.7.6, so I'm not sure the bogus win32 cwd affects them (except 
obviously cygstart).  But...by their very nature many of these tools use 
the native w32api.  So...each should probably take care to set the win32 
cwd if at all possible.


Yeah, patches would be great.

--
Chuck

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019