-
Notifications
You must be signed in to change notification settings - Fork 18k
os/exec: Cmd produces misleading error when using Setpgid #20285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This issue is also present on a linux/amd64 system (still using Go 1.8.1). |
Workaround: Test that the configured working directory exists before attempting to exec a process. |
Looks like the presence of a Lines 22 to 31 in 88672de
|
Hello @aronatkins, sorry that we hadn't looked at this. Am I right to allude that you'd suggest that we Stat for presence of the directory regardless of I'll invite @hanwen and @rsc to chime in, and perhaps we might punt this bug to Go1.11. If that happens apologies for that, we'll most definitely work on it during Go1.11. |
@odeke-em Thanks for the update. I'm OK with shifting this out of Go 1.10. From reading #3649, it appears that there are certain @rsc's comment #3649 (comment) is exactly what this issue is tracking. |
Cool, milestone set to Go1.11, please feel free to revert if there is something that we can do for Go1.10. |
Has been a long time but a friendly ping on this bug. It seems like it was punted to Go 1.11 but now 18 months later it seems like it wasn't fixed in that release (which I'm using), and neither in Go 1.12 which I also tested. I've just spent 2 days debugging a complex system issue that came down to the target directory not existing and I passed by the erroneous Happy to contribute where possible. 🙂 |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
What did you see instead?
Note that the error string makes the reader believe that "/bin/ls" is the thing that may not exist. Compare when not using
Setpgid
; the working directory is properly reported as not existing.The text was updated successfully, but these errors were encountered: