library syscall: linux fix

This commit is contained in:
xushiwei
2024-08-09 00:22:29 +08:00
parent c8de05f101
commit 8ca4212650

View File

@@ -70,14 +70,16 @@ func (w WaitStatus) StopSignal() Signal {
return Signal(w>>shift) & 0xFF
}
/* TODO(xsw):
func (w WaitStatus) TrapCause() int {
if w.StopSignal() != SIGTRAP {
return -1
}
return int(w>>shift) >> 8
/*
if w.StopSignal() != SIGTRAP {
return -1
}
return int(w>>shift) >> 8
*/
panic("todo: syscall.WaitStatus.TrapCause")
}
*/
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *syscall.Rusage) (wpid int, err error) {
var status c.Int