aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_bsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/exec_bsd.go')
-rw-r--r--src/syscall/exec_bsd.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/syscall/exec_bsd.go b/src/syscall/exec_bsd.go
index 730b63d1e5..17ca6f06cf 100644
--- a/src/syscall/exec_bsd.go
+++ b/src/syscall/exec_bsd.go
@@ -27,6 +27,7 @@ type SysProcAttr struct {
// Implemented in runtime package.
func runtime_BeforeFork()
func runtime_AfterFork()
+func runtime_AfterForkInChild()
// Fork, dup fd onto 0..len(fd), and exec(argv0, argvv, envv) in child.
// If a dup or exec fails, write the errno error to pipe.
@@ -88,6 +89,8 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr
// Fork succeeded, now in child.
+ runtime_AfterForkInChild()
+
// Enable tracing if requested.
if sys.Ptrace {
_, _, err1 = RawSyscall(SYS_PTRACE, uintptr(PTRACE_TRACEME), 0, 0)