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

Function ctrlhandler

sources/debugger.cpp:38–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

raise_sigintMethod · 0.80

Tested by

no test coverage detected