Reputation: 1007
On Linux/POSIX what's the equivalent of
TerminateProcess(GetCurrentProcess(), 0)
I want to be able to abruptly, unorderly terminate a program, no matter if I'm in a thread or not. I don't care about destructors, exit handlers or graceful termination, I just want to completely shutdown / kill the program.
Which system libraries must I include and which function / arguments must I use?
Upvotes: 2
Views: 543
Reputation: 71
The TerminateProcess
Win32 API is equal to kill
with SIGKILL
signal.
Upvotes: 0
Reputation:
You should use kill
function and SIGKILL
signal:
kill(getpid(), SIGKILL);
Upvotes: 6