HyperDbg Debugger
Loading...
Searching...
No Matches
platform-signal.h
Go to the documentation of this file.
1
20#pragma once
21
22#if defined(__linux__)
24#endif // defined(__linux__)
25
26//
27// Console-control handler signature. Matches the Win32 PHANDLER_ROUTINE shape
28// (and BreakController) so the same function pointer is usable on both platforms.
29// CtrlType is one of the CTRL_*_EVENT codes.
30//
31typedef BOOL (*PLATFORM_CTRL_HANDLER)(DWORD CtrlType);
32
33//
34// INSTALL the process console-control handler.
35// Windows: registers Handler via SetConsoleCtrlHandler.
36// Linux: blocks the relevant signals process-wide and starts a dedicated
37// sigwait() thread that translates them into CTRL_*_EVENT codes and
38// invokes Handler. Must be called once, before other threads spawn,
39// so the blocked-signal mask is inherited by every thread.
40// Returns TRUE on success, FALSE on failure.
41//
int BOOL
Definition BasicTypes.h:25
UCHAR BOOLEAN
Definition BasicTypes.h:35
unsigned long DWORD
Definition BasicTypes.h:38
BOOLEAN PlatformInstallCtrlHandler(PLATFORM_CTRL_HANDLER Handler)
BOOL(* PLATFORM_CTRL_HANDLER)(DWORD CtrlType)
Definition platform-signal.h:31