You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering about the comment in line 529:
"// returns a dup(2) - FD_CLOEXEC flag not set"
Is that strictly correct? If I call syscall.Syscall to GETFD , the value is 1
Isn't what happens that .File() actually returns a os.File with an FD with FD_CLOEXEC set (using dupCloseOnExec() in net/fd_unix.go )
And then... when you call
cmd := exec.Command(path, args...)
err = cmd.Start()
... the Go stdlib clears CLOEXEC on the files you put in cmd.ExtraFiles as a part of forkAndExecInChild() when it shuffles file descriptors around ?
The text was updated successfully, but these errors were encountered:
I was wondering about the comment in line 529:
"// returns a dup(2) - FD_CLOEXEC flag not set"
Is that strictly correct? If I call syscall.Syscall to GETFD , the value is 1
Isn't what happens that .File() actually returns a os.File with an FD with FD_CLOEXEC set (using dupCloseOnExec() in net/fd_unix.go )
And then... when you call
cmd := exec.Command(path, args...)
err = cmd.Start()
... the Go stdlib clears CLOEXEC on the files you put in cmd.ExtraFiles as a part of forkAndExecInChild() when it shuffles file descriptors around ?
The text was updated successfully, but these errors were encountered: