mirror of git://gcc.gnu.org/git/gcc.git
runtime: Use the clone system call on GNU/Linux.
Without this we weren't supporting the standard Cloneflags field of SysProcAttr. From-SVN: r214972
This commit is contained in:
parent
68a1a6c080
commit
01c2fa9d53
|
|
@ -43,7 +43,7 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr
|
||||||
// Declare all variables at top in case any
|
// Declare all variables at top in case any
|
||||||
// declarations require heap allocation (e.g., err1).
|
// declarations require heap allocation (e.g., err1).
|
||||||
var (
|
var (
|
||||||
r1 Pid_t
|
r1 uintptr
|
||||||
err1 Errno
|
err1 Errno
|
||||||
nextfd int
|
nextfd int
|
||||||
i int
|
i int
|
||||||
|
|
@ -65,7 +65,7 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr
|
||||||
// About to call fork.
|
// About to call fork.
|
||||||
// No more allocation or calls of non-assembly functions.
|
// No more allocation or calls of non-assembly functions.
|
||||||
runtime_BeforeFork()
|
runtime_BeforeFork()
|
||||||
r1, err1 = raw_fork()
|
r1, _, err1 = RawSyscall6(SYS_CLONE, uintptr(SIGCHLD)|sys.Cloneflags, 0, 0, 0, 0, 0)
|
||||||
if err1 != 0 {
|
if err1 != 0 {
|
||||||
runtime_AfterFork()
|
runtime_AfterFork()
|
||||||
return 0, err1
|
return 0, err1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue