Skip to content

Commit

Permalink
Merge pull request #687 from xushiwei/q
Browse files Browse the repository at this point in the history
library syscall: linux fix
  • Loading branch information
xushiwei authored Aug 8, 2024
2 parents c91dba5 + 8ca4212 commit 210c483
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions internal/lib/syscall/syscall_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 210c483

Please sign in to comment.