Debian Codegraph @

ide/rocqide/rocqide_WIN32.c.in

raw
1 #define _WIN32_WINNT 0x0501 /* Cf below, we restrict to */
2
3 #include <caml/mlvalues.h>
4 #include <caml/memory.h>
5 #include <windows.h>
6
7 /* Win32 emulation of a kill -2 (SIGINT) */
8
9 /* It appears that the documentation for SetConsoleCtrlHandler used in the
10 prior code (f5276a11) is incorrect. When it's present, it causes some of
11 the strange behavior described in #13550.
12
13 This code signals all processes in the process group (multiple coqidetops) and rocqide.
14 because the console is shared. Rocqide.win_interrupt is used to ignore the signal sent
15 to RocqIDE. */
16
17 CAMLprim value win32_interrupt(value pseudopid) {
18 CAMLparam1(pseudopid);
19 GenerateConsoleCtrlEvent(CTRL_C_EVENT,0); /* signal each process in the process group */
20 CAMLreturn(Val_unit);
21 }