On Fri, 11 May 2018 20:36:18 -0700 (PDT)
Tashi Lu <dotslash...@gmail.com> wrote:

> Hi gophers,
> 
> I faced a strange problem: os/exec always fails with `fork/exec 
> /usr/bin/qemu-img: invalid argument'. 
> 
> Simplified code is at https://play.golang.org/p/v1APfzmS2p9. It seems
> this simplified snippet runs well without errors, but my real code is
> no more than just some variable initializations than this snippet. So
> I suspect it's the context's problem, but my context is too complex
> to simplify and put onto the playground. What I can think of that
> what might be linked to this error is that this function is run in a
> goroutine. But I did write a simplified goroutine version, sadly it
> worked well too... I had no idea how to do further debugging.
> 
> And further, the executable is not to blame, it fails with the same
> error even if I substitute the executable to `ls' or anything else.

Try deleting the relevant lines of code and then write them again,
actually type them again, without referring to and especially not
copy'n'pasting code from somewhere else. Sounds stupid I know, but I've
given this advice many times over the years and it has an extremely
high success rate in the situation you're describing.

MSB

-- 
Light travels faster than sound. This is why some people appear bright
until you hear them speak.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to