summaryrefslogtreecommitdiffhomepage
path: root/runsc
diff options
context:
space:
mode:
authorBin Lu <bin.lu@arm.com>2019-09-05 07:50:44 +0000
committerBin Lu <bin.lu@arm.com>2019-09-05 07:51:12 +0000
commita25a97624c3460a3c3c9e4f76578ce0235d26c21 (patch)
tree6d4677d6a3e7bd809ac51e817b385dbf0775ff86 /runsc
parente31686500db56a5fcd4070561643d702a94da0c3 (diff)
Change syscall.Dup2 to syscall.Dup3
Signed-off-by: Bin Lu <bin.lu@arm.com>
Diffstat (limited to 'runsc')
-rw-r--r--runsc/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/main.go b/runsc/main.go
index 0ff68160d..b6546717c 100644
--- a/runsc/main.go
+++ b/runsc/main.go
@@ -237,7 +237,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.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)
}