mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Change syscall.Dup2 to syscall.Dup3
Signed-off-by: Bin Lu <bin.lu@arm.com>
This commit is contained in:
+1
-1
@@ -237,7 +237,7 @@ func main() {
|
|||||||
// want with them. Since Docker and Containerd both eat boot's stderr, we
|
// 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
|
// dup our stderr to the provided log FD so that panics will appear in the
|
||||||
// logs, rather than just disappear.
|
// logs, rather than just disappear.
|
||||||
if err := syscall.Dup2(int(f.Fd()), int(os.Stderr.Fd())); err != nil {
|
if err := syscall.Dup3(int(f.Fd()), int(os.Stderr.Fd()), 0); err != nil {
|
||||||
cmd.Fatalf("error dup'ing fd %d to stderr: %v", f.Fd(), err)
|
cmd.Fatalf("error dup'ing fd %d to stderr: %v", f.Fd(), err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user