MCPcopy Create free account
hub / github.com/covscript/covscript / ctrlhandler

Function ctrlhandler

sources/interpreter.cpp:34–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include <windows.h>
33
34bool ctrlhandler(DWORD fdwctrltype)
35{
36 switch (fdwctrltype) {
37 case CTRL_C_EVENT:
38 std::cout << "Keyboard Interrupt (Ctrl+C Received)" << std::endl;
39 cs::current_process->raise_sigint();
40 return true;
41 case CTRL_BREAK_EVENT: {
42 int code = 0;
43 cs::process_context::on_process_exit_default_handler(&code);
44 return true;
45 }
46 default:
47 return false;
48 }
49}
50
51void activate_sigint_handler()
52{

Callers

nothing calls this directly

Calls 1

raise_sigintMethod · 0.80

Tested by

no test coverage detected