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.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/syscall/exec_bsd.go b/src/syscall/exec_bsd.go
index af6c836961..b297db96cc 100644
--- a/src/syscall/exec_bsd.go
+++ b/src/syscall/exec_bsd.go
@@ -117,14 +117,16 @@ 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(SYS_GETPID, 0, 0, 0)
if err1 != 0 {
goto childerror
}
- pgrp = int(r1)
+ pgrp = _C_int(r1)
}
// Place process group in foreground.