This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Command line processing in dcrt0.cc does not match Microsoft parsing rules
- From: "Stephen Provine via cygwin" <cygwin at cygwin dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Fri, 6 Sep 2019 06:20:16 +0000
- Subject: RE: Command line processing in dcrt0.cc does not match Microsoft parsing rules
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IqnsTxSx5YZbKCiZv8qJVc4h3rKcnqwr9myT0wQZhfE=; b=LbYXX4A8ssDo6Fb9xWORPxcEQjPOwOpkLeXc3fvuag6fIjym+vHDj4QHovi1umW9HlYcx9BpljLppyPDEGl5sGXaoy4cBQQdLBiom1xpgCgNwh4UJjJwrnkNneiqZKqlCGs2RGn4Y/FvgL8BQw2mF3q/aQQ661xae4BH30UfjgVbxrrgw1TMhepPhLmHgk8cz5g1XA1mPHBHZ+yPUUsKDnv72curGbiKlmJWmrrYoQ4ceW6gUzUDoBITmTDkoccfHPk5HvtCWOLxVnlL5t1HFvkgFdxt2qo6g5JqcTUz0R4BelqMSOBaFYfFdSf6NB3nYWiAV7ayTBz8xnrDML47HA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ywgp5McT6BglhQx++GiBxDrqf3hb9jJuwumWuz75FPmNcTBO0e+RjDxnvrlkI1to4c42S5Z3daoEzJZK0Kp7zPQF8SYg5v7do7w4GEZUSmn2ZdRzF1C+73wLX/pNJ58Ecr8+ybxOmUgEVTd/HgI5CQZaXmwJPjf6hkQ1iK1AqXsGgikTTN7UNL3wmEeUIovxElgE7wPp1rSgCcXNjkn1FF/3lfG1TqQTNfCpEwwVpYj9dBN/rDuVlfIGQOmYw3axFBoczwC+yLpZhIw9bITazbHbjlNBc3Na2CnUTpyGo8CmGDTM6GrNpi1ytY0QXpYU14xAH4dvbZAxOMOMwVi67w==
- References: <MWHPR21MB08452919F35B1B0C5F0EB4DCB9BD0@MWHPR21MB0845.namprd21.prod.outlook.com> <MWHPR21MB0845F78385792965A94E0CD9B9BD0@MWHPR21MB0845.namprd21.prod.outlook.com> <MWHPR21MB084508155AB621C7AD81309CB9B90@MWHPR21MB0845.namprd21.prod.outlook.com> <MWHPR21MB08456D9F03AF8BD450E6AB2EB9B80@MWHPR21MB0845.namprd21.prod.outlook.com> <MWHPR21MB0845282E7582DC95ADF0F140B9BB0@MWHPR21MB0845.namprd21.prod.outlook.com> <MWHPR21MB084583452E7C41D0792C739EB9BB0@MWHPR21MB0845.namprd21.prod.outlook.com> <MWHPR21MB0845845AC5AD54E3A2EAA05EB9BB0@MWHPR21MB0845.namprd21.prod.outlook.com>
- Reply-to: Stephen Provine <stephpr at microsoft dot com>
On 9/5/19 9:26 PM, Eric Blake wrote:
> Rather, go is not passing the command line to CreateProcess in the way
> that is unambiguously parseable in the manner expected by
> CommandLineToArgvW.
The specific example I gave is unambiguous and is parsed correctly by
CommandLineToArgvW, so if the goal is for Cygwin to effectively
simulate this function, I can confirm that it is missing this case.
It's reasonable that Go's algorithm should be changed to have a better
chance of working with Windows programs that manually implement
command line parsing and may not match expectations for all cases.
I'll follow up with them and for the time being, work around the issue
with my own implementation as I've since figured out how to do that.
FWIW, here's the most definitive reference I've found for how Windows
binaries compiled with the Microsoft C/C++ compilers do command line
parsing, in case there is any desire to address this issue at some point:
http://daviddeley.com/autohotkey/parameters/parameters.htm#WINCRULES
Thanks for entertaining my persistence on this topic!
Stephen
--
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