[][src]Function tokio_signal::ctrl_c

pub fn ctrl_c() -> IoFuture<IoStream<()>>

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 binds to the default event loop. 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.