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 8a548fa
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(), 0xFF'FF'FF'FF);

Check failure on line 5 in src/closes-exit-minus-one.c

View workflow job for this annotation

GitHub Actions / builds / build (ubuntu-20.04, linux-ci)

missing terminating ' character [-Werror]
return -1;
}
#else
int main() { return -1; }
#endif

0 comments on commit 8a548fa

Please sign in to comment.