diff options
author | Thomas de Zeeuw <thomasdezeeuw@gmail.com> | 2018-01-11 15:31:51 +0100 |
---|---|---|
committer | Thomas de Zeeuw <thomasdezeeuw@gmail.com> | 2018-01-11 15:31:51 +0100 |
commit | 992c293e8822b3ee00b251633345459822ba4111 (patch) | |
tree | 3c32a0ef2be62475c420a21f504cfd640cc8de15 /test | |
parent | 2478f0fa44b548bfe3a120f8a4fef61e73cf7ba4 (diff) | |
download | nix-992c293e8822b3ee00b251633345459822ba4111.zip |
Remove return value from `pause`
`pause` will always return `-1` as a result and sets `errno` to
`EINTR`, which indicates that a signal was caught by the process. Since
this is the point of `pause` return an error here makes little sense.
Closes #827.
Diffstat (limited to 'test')
-rw-r--r-- | test/sys/test_wait.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/sys/test_wait.rs b/test/sys/test_wait.rs index 9992607c..2f68e7c4 100644 --- a/test/sys/test_wait.rs +++ b/test/sys/test_wait.rs @@ -12,7 +12,10 @@ fn test_wait_signal() { // Safe: The child only calls `pause` and/or `_exit`, which are async-signal-safe. match fork().expect("Error: Fork Failed") { - Child => pause().unwrap_or_else(|_| unsafe { _exit(123) }), + Child => { + pause(); + unsafe { _exit(123) } + }, Parent { child } => { kill(child, Some(SIGKILL)).expect("Error: Kill Failed"); assert_eq!(waitpid(child, None), Ok(WaitStatus::Signaled(child, SIGKILL, false))); |