Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Please add signals_are_pending to compatibility.h #7883
Original bug ID: 7883
signals_are_pending got renamed to signals_might_be_pending in 1c82c48 (4.08)
Context: we use it in Coq (https://github.com/coq/coq/blob/d501e6f301f1c023e57f14ee3441553c530d9394/kernel/byterun/coq_interp.c#L429)
Comment author: @jhjourdan
Frankly, I thought a bit about that, and I am not sure what's best: on the one side, Coq has to hijack OCaml's internal mechanisms, but on the other side, it is rather hard to design a signal handling mechanism in C which properly handles all signals and interferes properly with OCaml's mechanism.
Note that Coq already greatly hijack's OCaml's internals in order to have an efficient implementation of te VM...
Perhaps the actual "proper" answer to this issue is to provide a /public/ #define macro in OCaml header which one can call periodically to handle signals.
Comment author: @ejgallego
We could also use #ifdef in Coq + <caml/version.h> to workaround that as we are talking about C code.
IMVHO, Coq's VM should not rely on this in the medium-long term. Instead, we must redesign the way signals are handled in Coq so low-level components don't have to care so much.
For example, another problematic point are UIs / coqtop / XML protocol dying on Ctrl-C.