ExitProcess does not work in Cygwin? $ rm *.exe
# u is for Unix # w is for Windows $ cat u.c #include <stdlib.h> int main() { exit(1); } $ gcc u.c $ ./a.exe $ echo $? 1 => as expected $ cat w.c #include <windows.h> int main() { ExitProcess(1); } $ gcc w.c $ ./a.exe $ echo $? 0 => not expected $ uname -a CYGWIN_NT-10.0 jayk-tp4 3.3.3(0.341/5/3) 2021-12-03 16:35 x86_64 Cygwin works in debugger: $ /cygdrive/c/bin/amd64/windbg.exe .\\a.exe $ echo $? 1 ? - Jay -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple