From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17246 invoked by alias); 17 Jul 2013 14:20:50 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 17179 invoked by uid 89); 17 Jul 2013 14:20:48 -0000 X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_20,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1 Received: from Unknown (HELO out1-smtp.messagingengine.com) (66.111.4.25) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Jul 2013 14:20:47 +0000 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 73BE5218DB for ; Wed, 17 Jul 2013 10:20:39 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 17 Jul 2013 10:20:39 -0400 Received: from [158.147.137.108] (unknown [158.147.137.108]) by mail.messagingengine.com (Postfix) with ESMTPA id 39BE4680098; Wed, 17 Jul 2013 10:20:39 -0400 (EDT) Message-ID: <51E6A836.80800@cwilson.fastmail.fm> Date: Wed, 17 Jul 2013 14:54:00 -0000 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: The Cygwin Mailing List Subject: Re: Issue with run.exe and PWD with spaces since last update (Cygwin 1.7.21) References: <295777180.20130716202913@mtu-net.ru> <20130717125916.GB21347@calimero.vinschen.de> <51E69DE2.10008@cwilson.fastmail.fm> <20130717134532.GC32258@calimero.vinschen.de> <51E6A3DB.7050605@cwilson.fastmail.fm> <20130717141042.GE32258@calimero.vinschen.de> In-Reply-To: <20130717141042.GE32258@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00353.txt.bz2 On 7/17/2013 10:10 AM, Corinna Vinschen wrote: > Uhm. In that case, if ew *really* think your tools are the only > affected ones, Why do we bother to fix libcmain.c? Can't you then > simply provide your own main() in case of building for Cygwin? Perhaps, but I'm not sure of the ramifications. I think if you have a main() then you're going to get STD_HANDLES. Plus there's the whole concern about launching run[2].exe itself without a cmdbox, when it is used as a shortcut target. This whole entrypoint thing is tied up in that, or at least it used to be. Now, that may ONLY apply to the mingw[64]-compiled version, in which case I could do a #ifdef __CYGWIN__ int main (int argc, char** argv) { return realmain(argc, argv); } #endif and avoid the -e WinMain@16 link argument. (Except I think I arrange to only do -e WinMain@16 on mingw...hmm...) If you look closely at WinMain, it basically parses the result from GetCommandLine() into argc,argv, and then delegates. The only conceivable reason to do that, rather than just have a main(), was if you NEED to use WinMain() as the entry point for some other reason. Like ensuring that you "work" when compiled as a non-console app and don't pop up a dosbox... -- 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