aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_libc2.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/exec_libc2.go')
-rw-r--r--src/syscall/exec_libc2.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/syscall/exec_libc2.go b/src/syscall/exec_libc2.go
index b999754c2e..bd98109d07 100644
--- a/src/syscall/exec_libc2.go
+++ b/src/syscall/exec_libc2.go
@@ -117,14 +117,15 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr
}
if sys.Foreground {
- pgrp := sys.Pgid
+ // This should really be pid_t, however _C_int (aka int32) is
+ // generally equivalent.
+ pgrp := _C_int(sys.Pgid)
if pgrp == 0 {
r1, _, err1 = rawSyscall(abi.FuncPCABI0(libc_getpid_trampoline), 0, 0, 0)
if err1 != 0 {
goto childerror
}
-
- pgrp = int(r1)
+ pgrp = _C_int(r1)
}
// Place process group in foreground.