pub fn ctrl_c_handle(handle: &Handle) -> IoFuture<IoStream<()>>
Expand description
Creates a stream which receives “ctrl-c” notifications sent to a process.
In general signals are handled very differently across Unix and Windows, but this is somewhat cross platform in terms of how it can be handled. A ctrl-c event to a console process can be represented as a stream for both Windows and Unix.
This function receives a Handle
to an event loop and returns a future
which when resolves yields a stream receiving all signal events. Note that
there are a number of caveats listening for signals, and you may wish to
read up on the documentation in the unix
or windows
module to take a
peek.