X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=apfeo/ccfeaMjTsA0pMyqsMyHu41V2SKYzKc/CQ02DSEBNEbHzFju
	Jl4zdUcs2ZlfMlWyQ/pk4XBBbNTu3E0EIPbvd4dsc6/aCza7+XUY/UmcmPI4xNnb
	94zpy0pM0RuXLODuTPEPPEL/cdkCYgoCNdmDUjSY8slFLQMby0tNvE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=h9DNiD05lsaR68ceTZz/ZauUvEk=; b=lN/54G5qLU0GFanQHRodNbQUdvWR
	9oNdmJtXLiTV0mwo6w0R0rNgt4Ch2mKiSzPSYHYLdpiIHnFq7f24f/4v5oBhXstQ
	uoKIVsgCl0koSMLKWMTBJduoOAXDYO1QzeddKJtnKclnXvXAn67htjwW+yjqCQjE
	xFcjrDd7ea98plM=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_50,RDNS_NONE autolearn=no version=3.3.1
Date: Wed, 17 Jul 2013 14:59:16 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Issue with run.exe and PWD with spaces since last update (Cygwin 1.7.21)
Message-ID: <20130717125916.GB21347@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <295777180.20130716202913@mtu-net.ru>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <295777180.20130716202913@mtu-net.ru>
User-Agent: Mutt/1.5.21 (2010-09-15)

On Jul 16 20:29, Andrey Repin wrote:
> Greetings, All!
> 
> I'm trying to execute a script that was working fine until recent update.
> It doesn't crash, just, for some reason, trim the last component of a path.
> 
> In a nutshell, the issue is this:
> 
> $ mkdir "/a b"
> $ cd "/a b"
> $ ls -l "$SYSTEMROOT/System32/notepad.exe"
> (just to confirm that the file actually exists)
> $ run "$SYSTEMROOT/System32/notepad.exe"
> Error pops up:

This never works, even in any other directory.  It's the same problem
which disallows checkX to work, as reported in
http://cygwin.com/ml/cygwin/2013-07/msg00326.html

The cause is an optimization when calling cygwin executables.  So far,
Cygwin executables got their arguments via mmeory copy as well as via
the single-line cmdline argument of CreateProcess.  We removed the
latter since it was never meant to work that way in the first place.

Unfortunately it turns out that run/run2/checkX are Cygwin executables
which don't have a main routine, but rather a WinMain routine.  The
latter has a single cmdline argument, which is generated via
GetCommandLine().  But since Cygwin executables get no single-line
command line anymore, this stopped working.


Stay tuned,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

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

