diff options
| author | Clément Chigot <clement.chigot@atos.net> | 2018-10-25 11:32:35 +0200 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-10-25 16:03:56 +0000 |
| commit | f98ac8519257f8e4d2e886b84ccab628eeb61244 (patch) | |
| tree | a8e77829814eec0681431f7f1003a483d387c1d7 /src/syscall/exec_libc.go | |
| parent | c8b2ac68906a154c470a845172f133aceae7c5c7 (diff) | |
| download | go-f98ac8519257f8e4d2e886b84ccab628eeb61244.tar.xz | |
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 <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall/exec_libc.go')
| -rw-r--r-- | src/syscall/exec_libc.go | 4 |
1 files changed, 2 insertions, 2 deletions
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. |
