From: Ian Lance Taylor Date: Fri, 23 Jun 2017 14:08:56 +0000 (-0700) Subject: os: align siginfo argument to waitid X-Git-Tag: go1.9beta2~8 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ddeab538263307f6d76e3a8a7f2c4b12383b61bc;p=gostls13.git os: align siginfo argument to waitid I have no test case for this, but there is one report on the mailing list (https://groups.google.com/d/msg/golang-dev/sDg-t1_DPw0/-AJmLxgPBQAJ) in which waitid running on MIPS returns EFAULT. Change-Id: I79bde63c7427eefc1f2925d78d97cc9cf2fffde3 Reviewed-on: https://go-review.googlesource.com/46511 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/os/wait_waitid.go b/src/os/wait_waitid.go index a6c5c729d2..5a62b27f19 100644 --- a/src/os/wait_waitid.go +++ b/src/os/wait_waitid.go @@ -26,7 +26,7 @@ func (p *Process) blockUntilWaitable() (bool, error) { // On Darwin, it requires greater than or equal to 64 bytes // for darwin/{386,arm} and 104 bytes for darwin/amd64. // We don't care about the values it returns. - var siginfo [128]byte + var siginfo [16]uint64 psig := &siginfo[0] _, _, e := syscall.Syscall6(syscall.SYS_WAITID, _P_PID, uintptr(p.Pid), uintptr(unsafe.Pointer(psig)), syscall.WEXITED|syscall.WNOWAIT, 0, 0) runtime.KeepAlive(p)