diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-09-05 15:24:36 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-09-05 15:24:36 +0000 |
commit | 01c2fa9d53bee9a6aeeb2b8026081db22c2a66f1 (patch) | |
tree | 8f3ee162354eef2377a071a0cab0836a7e80b4c7 /libgo/go | |
parent | 68a1a6c080d945adc22c5098e155c7ad500f81df (diff) | |
download | gcc-01c2fa9d53bee9a6aeeb2b8026081db22c2a66f1.zip gcc-01c2fa9d53bee9a6aeeb2b8026081db22c2a66f1.tar.gz gcc-01c2fa9d53bee9a6aeeb2b8026081db22c2a66f1.tar.bz2 |
runtime: Use the clone system call on GNU/Linux.
Without this we weren't supporting the standard Cloneflags
field of SysProcAttr.
From-SVN: r214972
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/syscall/exec_linux.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/syscall/exec_linux.go b/libgo/go/syscall/exec_linux.go index 5d14ec3..6a92163 100644 --- a/libgo/go/syscall/exec_linux.go +++ b/libgo/go/syscall/exec_linux.go @@ -43,7 +43,7 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr // Declare all variables at top in case any // declarations require heap allocation (e.g., err1). var ( - r1 Pid_t + r1 uintptr err1 Errno nextfd int i int @@ -65,7 +65,7 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr // About to call fork. // No more allocation or calls of non-assembly functions. runtime_BeforeFork() - r1, err1 = raw_fork() + r1, _, err1 = RawSyscall6(SYS_CLONE, uintptr(SIGCHLD)|sys.Cloneflags, 0, 0, 0, 0, 0) if err1 != 0 { runtime_AfterFork() return 0, err1 |