Command line processing in dcrt0.cc does not match Microsoft parsing rules

Steven Penny svnpenn@gmail.com
Fri Sep 6 00:46:00 GMT 2019


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



More information about the Cygwin mailing list