1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Platform plumbing: one kernel queue that waits on pipes and process exits
//! together.
//!
//! Nothing here knows about tags or `Command`s. Each platform module turns
//! its kernel's primitives into the same two types with the same contract,
//! and everything above is written against that contract alone:
//!
//! - [`Poller`] is the queue. `watch_read` registers a descriptor for
//! level-triggered readability under a caller-chosen token — a descriptor
//! stays ready until drained or removed, so a caller reading one chunk per
//! wakeup cannot lose the rest. `watch_exit` arranges for a token to come
//! out of `wait` at least once after the process exits, even when the
//! process is already dead (but not reaped) as the watch is made. `wait`
//! blocks for the next batch of ready tokens.
//! - [`ExitWatch`] is what `watch_exit` returns: the handle through which the
//! process is signalled (`send_signal`) and its watch removed
//! ([`Poller::unwatch_exit`]). Signalling through it cannot hit a recycled
//! pid, provided the child was unreaped when the watch was made and is not
//! signalled after being reaped — which the set upholds.
use cratecvt;
pub use ;
pub use ;
use ;
compile_error!;
/// Put a descriptor into non-blocking mode.