From 8ca4212650462d2c7a8095b404512d0bd7cd2dee Mon Sep 17 00:00:00 2001 From: xushiwei Date: Fri, 9 Aug 2024 00:22:29 +0800 Subject: [PATCH] library syscall: linux fix --- internal/lib/syscall/syscall_linux.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/internal/lib/syscall/syscall_linux.go b/internal/lib/syscall/syscall_linux.go index 17d9fe95e..ee097f352 100644 --- a/internal/lib/syscall/syscall_linux.go +++ b/internal/lib/syscall/syscall_linux.go @@ -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