Skip to content

Commit

Permalink
close-exit-minus-one: Exit with TerminateProcess on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
WangWeiLin-MV committed Sep 18, 2024
1 parent 7cbea39 commit 49fb8c0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/closes-exit-minus-one.c
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
#if defined(_WIN32)
#include <Windows.h>
int main()
{
TerminateProcess(GetCurrentProcess(), 0xFFFFFFFF);
return -1;
}
#else
int main() { return -1; }
#endif

0 comments on commit 49fb8c0

Please # to comment.