From f98ac8519257f8e4d2e886b84ccab628eeb61244 Mon Sep 17 00:00:00 2001 From: Clément Chigot Date: Thu, 25 Oct 2018 11:32:35 +0200 Subject: syscall: fix TestForeground for AIX On AIX, sys.Pgid must be a int32 and not a int64 as on Solaris for ioctl syscall. Pid_t type can be used to provide the same code in both OS. But pid_t must be added to ztypes_solaris_amd64.go. Change-Id: I1dbe57f099f9e5ac9491aaf246a521137eea5014 Reviewed-on: https://go-review.googlesource.com/c/144539 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/syscall/exec_libc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/syscall/exec_libc.go') diff --git a/src/syscall/exec_libc.go b/src/syscall/exec_libc.go index d6d34c04c3..0133139000 100644 --- a/src/syscall/exec_libc.go +++ b/src/syscall/exec_libc.go @@ -124,14 +124,14 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr } if sys.Foreground { - pgrp := sys.Pgid + pgrp := _Pid_t(sys.Pgid) if pgrp == 0 { r1, err1 = getpid() if err1 != 0 { goto childerror } - pgrp = int(r1) + pgrp = _Pid_t(r1) } // Place process group in foreground. -- cgit v1.3