diff options
Diffstat (limited to 'src/syscall/exec_libc.go')
| -rw-r--r-- | src/syscall/exec_libc.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/syscall/exec_libc.go b/src/syscall/exec_libc.go index 3c8e87d32f..8a84954051 100644 --- a/src/syscall/exec_libc.go +++ b/src/syscall/exec_libc.go @@ -116,8 +116,6 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr // Fork succeeded, now in child. - runtime_AfterForkInChild() - // Session ID if sys.Setsid { _, err1 = setsid() @@ -153,6 +151,10 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr } } + // Restore the signal mask. We do this after TIOCSPGRP to avoid + // having the kernel send a SIGTTOU signal to the process group. + runtime_AfterForkInChild() + // Chroot if chroot != nil { err1 = chroot1(uintptr(unsafe.Pointer(chroot))) |
