mio-pidfd
A Linux pidfd wrapper for mio. This is useful for using mio to wait for multiple child processes to exit in a non-blocking event-driven way.
Heavily inspired by mio-timerfd
Example
use PidFd;
use ;
use ;
let poll = new.unwrap;
let mut events = with_capacity;
let mut child = new.arg.spawn.unwrap;
let pidfd = new.unwrap;
poll.register
.unwrap;
poll.poll.unwrap;
assert!;
Requirements
This library relies on the pidfd_open()
system call which was introduced
in Linux kernel version 5.3.
The pidfd_send_signal()
system call (used by supplementary kill()
functionality) was introduced in Linux kernel version 5.1