Go 1.13: Spawn fails with "operation not permitted"
neild opened this issue · 3 comments
neild commented
Spawn fails on Go 1.13:
$ go run ./examples/process/ 10
F0625 11:06:45.549888 104755 process.go:45] fork/exec /usr/bin/bc: operation not permitted
exit status 1
Culprit is https://go-review.googlesource.com/c/go/+/178919 ("syscall: use Ctty before fd shuffle").
If I'm following correctly, the problem is here:
cmd.SysProcAttr = &syscall.SysProcAttr{
Setsid: true,
Setctty: true}
Setting Setctty
sets the controlling terminal to SysProcAttr.Ctty
, which is unset (i.e., 0
), which is probably not the desired behavior.
neild commented
Not sure whether this is a problem here or in https://go-review.googlesource.com/c/go/+/178919, now that I look at this more closely. Will reopen golang/go#29458 to discuss.
skalle commented
Ok cool, I'll hold back for a bit until that's figured out.
skalle commented
No updates for a while, closing.