Is there a way to listen for signals on Windows?
I am writing a small Windows shell in Rust and want to kill the Command
one I spawned and do not let my shell exit from it.
Is there a way to capture the Windows equivalent SIGINT
in Rust?
+3
lines
source
to share
1 answer
There is a drawer , chan-signal
which helps to cope with it, creating a flow and waiting for the signal.
EDIT: It does not currently support windows.
There is an RFC asking to include this functionality in the language standard library, but it is very young.
It seems like you need to go with FFI.
0
iajrz
source
to share