]> Cypherpunks repositories - gostls13.git/commitdiff
os: align siginfo argument to waitid
authorIan Lance Taylor <iant@golang.org>
Fri, 23 Jun 2017 14:08:56 +0000 (07:08 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 23 Jun 2017 17:02:41 +0000 (17:02 +0000)
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 <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/wait_waitid.go

index a6c5c729d2ea1df5a0657c693bb0f8f8fba25421..5a62b27f191f22c98634c30fd0d09919dc65fa44 100644 (file)
@@ -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)