Commit ddeab538 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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 <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent c23948a2
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment