From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30163 invoked by alias); 6 Sep 2019 00:46:36 -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 30150 invoked by uid 89); 6 Sep 2019 00:46:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*UA:github.com, H*r:289, H*M:1c69fb81, H*M:google X-HELO: mail-oi1-f181.google.com Received: from mail-oi1-f181.google.com (HELO mail-oi1-f181.google.com) (209.85.167.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Sep 2019 00:46:32 +0000 Received: by mail-oi1-f181.google.com with SMTP id h4so3547105oih.8 for ; Thu, 05 Sep 2019 17:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:to:subject:references:user-agent; bh=hs/avTML3zpDFxqNeVasoSAuFJ6E0VF7033/08+Psdo=; b=K30N3Mw4UbFCfgyhrIPmhT5oCFUxp+v9ICHWYnpbwEjHpagVmPq9ptLulb8x2itiUo vIV5BUWc6uJLj//o3OOIvt4RNf5VP5cguL9HqM0cMmxRlZ5lEGbJe42jV+Xw4/7d6xeg sdtLj3m/4bu9Xi2c62w4Pex97VKgJenlItAq24DJ8jza6Tqj6rhQcu/bOUzigq23WylV kD7GMFaR1/GBw9XEs52E0BjSBWQcwNZkzkW/OrIsJTa+WzPP73QBIeqVhRNsnyHt/Iv4 ALQZ8xHv8aPxj6zl4vQWrwtWrdvn6tQXZew8rBGziObxhwUk/hobrG62UXE/kKXvbqdk X5qA== Return-Path: Received: from vUI ([2605:6000:9fc0:56:bdec:289:404:3d23]) by smtp.gmail.com with ESMTPSA id w201sm1045283oie.44.2019.09.05.17.46.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 17:46:29 -0700 (PDT) Message-ID: <5d71ac65.1c69fb81.686f1.8589@mx.google.com> Date: Fri, 06 Sep 2019 00:46:00 -0000 From: Steven Penny To: cygwin@cygwin.com Subject: Re: RE: Command line processing in dcrt0.cc does not match Microsoft parsing rules References: Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Suede Mail/2.8.0 (github.com/cup/suede) X-SW-Source: 2019-09/txt/msg00050.txt.bz2 On Thu, 5 Sep 2019 23:45:44, "Stephen Provine via cygwin" wrote: > package main > > import ( > "log" > "os" > "os/exec" > ) > > func main() { > cmd :=3D exec.Command("C:\\cygwin64\\bin\\bash.exe", "test.sh", "foo", "ba= > r\"baz", "bat") > cmd.Stdout =3D os.Stdout > cmd.Stderr =3D os.Stderr > if err :=3D cmd.Run(); err !=3D nil { > log.Fatal(err) > } > } Why are you doing this? I hate to be that guy, but examples are important. Arguably the most important lesson I have learned with computer programming is: use the right tool for the job. So when I need to do something, I start with a shell script. Then once a shell script doesnt cut it anymore, I move to AWK, then Python, the Go. Substitute your language of choice. What I dont do is call a shell script from Go or anything else. I might call "git.exe" or "ffmpeg.exe", but even then you could argue against it as those binaries have libraries too. I agree that Cygwin should be parsing to and from cmd.exe correctly. But unless you have a valid use case, its kind of like "Cygwin theory". I have found that historically those type issues are less likely to be resolved in timely manner, if at all. -- 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