summaryrefslogtreecommitdiff
path: root/test/test_poll.rs
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2022-06-08 09:52:53 +0200
committerStefano Garzarella <sgarzare@redhat.com>2022-06-09 09:09:23 +0200
commitc3081e4896344dbf0c27103a60c90eaa8d35715e (patch)
tree2487a8ea9384924ec651ee39b46980eb97613abf /test/test_poll.rs
parent5dedbc7850448ae3922ab0a833f3eb971bf7e25f (diff)
downloadnix-c3081e4896344dbf0c27103a60c90eaa8d35715e.zip
ppoll: make sigmask parameter optional
ppoll(2) supports 'sigmask' as NULL. In that case no signal mask manipulation is performed. Let's make `sigmask` parameter of `nix::poll::ppoll` optional to allow that behaviour. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Diffstat (limited to 'test/test_poll.rs')
-rw-r--r--test/test_poll.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_poll.rs b/test/test_poll.rs
index e4b369f3..120e8e56 100644
--- a/test/test_poll.rs
+++ b/test/test_poll.rs
@@ -53,14 +53,14 @@ fn test_ppoll() {
// Poll an idle pipe. Should timeout
let sigset = SigSet::empty();
- let nfds = loop_while_eintr!(ppoll(&mut fds, Some(timeout), sigset));
+ let nfds = loop_while_eintr!(ppoll(&mut fds, Some(timeout), Some(sigset)));
assert_eq!(nfds, 0);
assert!(!fds[0].revents().unwrap().contains(PollFlags::POLLIN));
write(w, b".").unwrap();
// Poll a readable pipe. Should return an event.
- let nfds = ppoll(&mut fds, Some(timeout), SigSet::empty()).unwrap();
+ let nfds = ppoll(&mut fds, Some(timeout), None).unwrap();
assert_eq!(nfds, 1);
assert!(fds[0].revents().unwrap().contains(PollFlags::POLLIN));
}