From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109946 invoked by alias); 4 Sep 2019 23:46:24 -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 109938 invoked by uid 89); 4 Sep 2019 23:46:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_SPF_HELO,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.1 spammy=study, inherit, HX-Languages-Length:1348, reproduction X-HELO: NAM02-SN1-obe.outbound.protection.outlook.com Received: from mail-eopbgr770105.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) (40.107.77.105) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Sep 2019 23:46:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kjgys8Xvh6j0XgYFPYnfLho12VGCoa1YCRBKyRerO8so+fYyFN268dkkuftoshwNgoJFYX97DnP1KuJcF7JJs0w/ogq3O3zzTwm0ZYPMmx79OcoJJAiOKmvGkyyEIwjZcZ4yksnH29lSWKly9StVphcqrSeGPJCWADgW8PkFu5uP7lv0h4MVIRQpIpUCp+CUTUGDYFjuo/mu53QaUr1sP8TF+mPbis0KTCe6/3Y5QuxekZeCNQIU6yWq7d+ICwhO6W7i9gPLDYM1BwVGKrzUjd8/m/4bt+DhfhIqiawIqjpXETw2/FhY++ONNloV5fF7p9jlXJZ+i5WCMbMU3AA9ZQ== 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=4ZTH+/PHwyH1GPlq9EsuWI3m/q3Bww0laIn/CGxrxl4=; b=DsDAMPw29FCFsNdY840s5cYk5G0Ha4arLU1QPUJMdUu98m0VYzBKESnP+yc9sTrBPCXWkTHsjH6jPoJ6Hz3/BhIeRKqa9sW6EBV1QQlhLYcGcHjdp0c9QVFs5Ltxfk7z2jKiRvuU+g1/oEzZz5u7gOyh7wAschBelF8AcFPY8R9A1cKeoc19EaamqWzgu+taPoom8KlXdY52xWldYlM/JJ6bjdzUHJFIJ9TsgrjY+JJG6bCM9wLftLwoYTD1IArB25pD7/5oCFQa6Ga7xxnvn64q9qqBi3rtB9DYe23Fd0y2TypWbpgmxh0dAwqy2LRnMwSkO5Cu7OzSTeQ1dItxqw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4ZTH+/PHwyH1GPlq9EsuWI3m/q3Bww0laIn/CGxrxl4=; b=XUKwEMK5NE+GalBp7TT+3B02Dsbrh3g/FqsG/CGS9/JlzOmLCsyjakHzsXEpuculXFfHhpGpNVPV87F3+lKRO+LCD6FnJDWY8tM6LCL5hA3m1NpZM+ywxf8W/ah14qco3L7N5H4elTiQtp5eI+D5ixw2U1Y23elQZNMGPpasnbs= Received: from MWHPR21MB0845.namprd21.prod.outlook.com (10.173.51.139) by MWHPR21MB0159.namprd21.prod.outlook.com (10.173.52.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.5; Wed, 4 Sep 2019 23:46:18 +0000 Received: from MWHPR21MB0845.namprd21.prod.outlook.com ([fe80::3085:a037:7cbc:be5]) by MWHPR21MB0845.namprd21.prod.outlook.com ([fe80::3085:a037:7cbc:be5%5]) with mapi id 15.20.2241.014; Wed, 4 Sep 2019 23:46:17 +0000 From: "Stephen Provine via cygwin" Reply-To: Stephen Provine To: "cygwin@cygwin.com" , "Brian.Inglis@SystematicSw.ab.ca" Subject: RE: Command line processing in dcrt0.cc does not match Microsoft parsing rules Date: Wed, 04 Sep 2019 23:46:00 -0000 Message-ID: References: In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=stephpr@microsoft.com; x-ms-oob-tlc-oobclassifiers: OLM:5516; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: b6l6uHTLLrFWFx8PP3N4VACl5dbaw4uTfGVGmkZuVugklqLJB5DIYl0qu9ybYvu8Q4/mg/skGjm0VBSUo6DgYw== X-SW-Source: 2019-09/txt/msg00032.txt.bz2 On 2019-09-04 10:20, Brian Inglis wrote: > and ask if you really expect anyone else to use or reproduce this insanit= y, > rather than a sane POSIX parser? I know it's insanity, but it's insanity that almost all Windows programs in= herit and implement consistently enough because they use standard libraries or functi= ons to do the parsing. The Go command line parser used to use CommandLineToArgvW and only switched away from it due to performance (it's in shell32.dll and = that takes a long time to load). I don't know how accurate their manual reproduction i= s, but they seemed to study the sources I sent pretty carefully. Anyway, my specific problem is that I have Go code with an array of argumen= ts that I want to pass verbatim (no glob expansion) to a bash script. I've figured = out how to override Go's default code for building the command line string, but it's n= ot clear how to correctly construct the command line string. If the POSIX rules are bein= g followed, I'd expect the following to work: bash.exe script.sh arg1 "*" arg3 But it always expands the "*" to all the files in the current directory. I'= ve also tried \* and '*', but same problem. So how do I build a command line string that takes e= ach argument literally with no processing? Thanks, 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