mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Preserve log FD after execve
PiperOrigin-RevId: 306908296
This commit is contained in:
committed by
gVisor bot
parent
eb7b1903e0
commit
5a8ee1beee
+1
-1
@@ -291,7 +291,7 @@ func main() {
|
||||
// want with them. Since Docker and Containerd both eat boot's stderr, we
|
||||
// dup our stderr to the provided log FD so that panics will appear in the
|
||||
// logs, rather than just disappear.
|
||||
if err := syscall.Dup3(fd, int(os.Stderr.Fd()), syscall.O_CLOEXEC); err != nil {
|
||||
if err := syscall.Dup3(fd, int(os.Stderr.Fd()), 0); err != nil {
|
||||
cmd.Fatalf("error dup'ing fd %d to stderr: %v", fd, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user