Handle signals, especially sigint (ctrl-C)
Signal handling
Need
It would be interesting to allow to launch next item after a ctrl-C.
To do this, we have to handle that sort of signal.
Problems
- Multi-threading needs. Especially
An OCaml signal handler can run at any time, which introduces all the semantic complexities of multi-threading. It is much easier to use Async's signal handling, see [root:Async_unix].Signal, which does not involve multi-threading, and runs user code as ordinary Async jobs.
- Other interesting signals in comments
- Need test, to be sure it works properly, because of the complexity (See first problem).
- First commits don't implement this completely, because it's quite hard to know how to quit and launch next (By calling sub argument in Command module? Launch something else, like another command (stability issue, since when command interface change, even slightly, we need to think to change the code, hence exceptions would be risen)).