diff options
Diffstat (limited to 'src/pkg/syscall/syscall_linux.go')
| -rw-r--r-- | src/pkg/syscall/syscall_linux.go | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go index 900889df6..e4b82569e 100644 --- a/src/pkg/syscall/syscall_linux.go +++ b/src/pkg/syscall/syscall_linux.go @@ -120,25 +120,15 @@ const ( shift = 8; ) -func (w WaitStatus) Exited() bool { - return w&mask == exited; -} +func (w WaitStatus) Exited() bool { return w&mask == exited } -func (w WaitStatus) Signaled() bool { - return w&mask != stopped && w&mask != exited; -} +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited } -func (w WaitStatus) Stopped() bool { - return w&0xFF == stopped; -} +func (w WaitStatus) Stopped() bool { return w&0xFF == stopped } -func (w WaitStatus) Continued() bool { - return w == 0xFFFF; -} +func (w WaitStatus) Continued() bool { return w == 0xFFFF } -func (w WaitStatus) CoreDump() bool { - return w.Signaled() && w&core != 0; -} +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } func (w WaitStatus) ExitStatus() int { if !w.Exited() { @@ -536,17 +526,11 @@ func PtraceCont(pid int, signal int) (errno int) { return ptrace(PTRACE_CONT, pid, 0, uintptr(signal)); } -func PtraceSingleStep(pid int) (errno int) { - return ptrace(PTRACE_SINGLESTEP, pid, 0, 0); -} +func PtraceSingleStep(pid int) (errno int) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) } -func PtraceAttach(pid int) (errno int) { - return ptrace(PTRACE_ATTACH, pid, 0, 0); -} +func PtraceAttach(pid int) (errno int) { return ptrace(PTRACE_ATTACH, pid, 0, 0) } -func PtraceDetach(pid int) (errno int) { - return ptrace(PTRACE_DETACH, pid, 0, 0); -} +func PtraceDetach(pid int) (errno int) { return ptrace(PTRACE_DETACH, pid, 0, 0) } // Sendto // Recvfrom |
