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. diff --git a/src/syscall/syscall_aix.go b/src/syscall/syscall_aix.go index bddc590c34..6512761c33 100644 --- a/src/syscall/syscall_aix.go +++ b/src/syscall/syscall_aix.go @@ -184,15 +184,15 @@ func ReadDirent(fd int, buf []byte) (n int, err error) { return getdirent(fd, buf) } -//sys wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) +//sys wait4(pid _Pid_t, status *_C_int, options int, rusage *Rusage) (wpid _Pid_t, err error) func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { var status _C_int - var r Pid_t + var r _Pid_t err = ERESTART // AIX wait4 may return with ERESTART errno, while the processus is still // active. for err == ERESTART { - r, err = wait4(Pid_t(pid), &status, options, rusage) + r, err = wait4(_Pid_t(pid), &status, options, rusage) } wpid = int(r) if wstatus != nil { diff --git a/src/syscall/types_aix.go b/src/syscall/types_aix.go index f9f05af667..b961bdb197 100644 --- a/src/syscall/types_aix.go +++ b/src/syscall/types_aix.go @@ -86,7 +86,7 @@ type Rusage C.struct_rusage type Rlimit C.struct_rlimit -type Pid_t C.pid_t +type _Pid_t C.pid_t type _Gid_t C.gid_t diff --git a/src/syscall/types_solaris.go b/src/syscall/types_solaris.go index a9e6d6bdd6..76a74508d2 100644 --- a/src/syscall/types_solaris.go +++ b/src/syscall/types_solaris.go @@ -101,6 +101,8 @@ type Rusage C.struct_rusage type Rlimit C.struct_rlimit +type _Pid_t C.pid_t + type _Gid_t C.gid_t // Files diff --git a/src/syscall/zsyscall_aix_ppc64.go b/src/syscall/zsyscall_aix_ppc64.go index 3ea11f8af3..fe27dcadf2 100644 --- a/src/syscall/zsyscall_aix_ppc64.go +++ b/src/syscall/zsyscall_aix_ppc64.go @@ -420,9 +420,9 @@ func getdirent(fd int, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) { +func wait4(pid _Pid_t, status *_C_int, options int, rusage *Rusage) (wpid _Pid_t, err error) { r0, _, e1 := syscall6(uintptr(unsafe.Pointer(&libc_wait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(status)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = Pid_t(r0) + wpid = _Pid_t(r0) if e1 != 0 { err = errnoErr(e1) } diff --git a/src/syscall/ztypes_aix_ppc64.go b/src/syscall/ztypes_aix_ppc64.go index 4fbbe23134..314266ea79 100644 --- a/src/syscall/ztypes_aix_ppc64.go +++ b/src/syscall/ztypes_aix_ppc64.go @@ -64,7 +64,7 @@ type Rlimit struct { Max uint64 } -type Pid_t int32 +type _Pid_t int32 type _Gid_t uint32 diff --git a/src/syscall/ztypes_solaris_amd64.go b/src/syscall/ztypes_solaris_amd64.go index b892cd6612..f846666fff 100644 --- a/src/syscall/ztypes_solaris_amd64.go +++ b/src/syscall/ztypes_solaris_amd64.go @@ -60,6 +60,8 @@ type Rlimit struct { Max uint64 } +type _Pid_t int32 + type _Gid_t uint32 const (