The corresponding code, which is a fair bit more complex in "glibc" than the above MingW code (because it has a lot of options that has both compile tile and runtime choices associated with them):
However, the simple view is that it does:
result = main (argc, argv, __environ MAIN_AUXVEC_PARAM);
exit (result);
And yes, exit
will kill all threads (if nothing else, the OS will when the system call to exit is called in _exit()
.