diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-02-29 11:23:13 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-02-29 11:23:13 +0100 |
| commit | b6d7097a0d6072199f2cd74d67404890697cf78a (patch) | |
| tree | a2193c528a79fd5606507568859ee5067c6b86e4 /src/pkg/syscall/syscall_bsd.go | |
| parent | 4cecda6c347bd6902b960c6a35a967add7070b0d (diff) | |
| download | golang-b6d7097a0d6072199f2cd74d67404890697cf78a.tar.gz | |
Imported Upstream version 2012.02.22upstream-weekly/2012.02.22
Diffstat (limited to 'src/pkg/syscall/syscall_bsd.go')
| -rw-r--r-- | src/pkg/syscall/syscall_bsd.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/syscall/syscall_bsd.go b/src/pkg/syscall/syscall_bsd.go index 16f20981c..c1a822aa1 100644 --- a/src/pkg/syscall/syscall_bsd.go +++ b/src/pkg/syscall/syscall_bsd.go @@ -106,8 +106,8 @@ func (w WaitStatus) ExitStatus() int { func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 } -func (w WaitStatus) Signal() int { - sig := int(w & mask) +func (w WaitStatus) Signal() Signal { + sig := Signal(w & mask) if sig == stopped || sig == 0 { return -1 } @@ -116,15 +116,15 @@ func (w WaitStatus) Signal() int { func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } -func (w WaitStatus) Stopped() bool { return w&mask == stopped && w>>shift != SIGSTOP } +func (w WaitStatus) Stopped() bool { return w&mask == stopped && Signal(w>>shift) != SIGSTOP } -func (w WaitStatus) Continued() bool { return w&mask == stopped && w>>shift == SIGSTOP } +func (w WaitStatus) Continued() bool { return w&mask == stopped && Signal(w>>shift) == SIGSTOP } -func (w WaitStatus) StopSignal() int { +func (w WaitStatus) StopSignal() Signal { if !w.Stopped() { return -1 } - return int(w>>shift) & 0xFF + return Signal(w>>shift) & 0xFF } func (w WaitStatus) TrapCause() int { return -1 } |
