Exit functions in C
问题 What is the difference between exit() , _exit() and _Exit() in C? How do I decide which to use? On bash, man 2 exit gave me the page _EXIT(2), whereas man 3 exit gave the page EXIT(3). 回答1: exit() terminating after cleanup. _exit() terminating immediately after call. If you have some stack corrupted while exit() function was called program may close with Segmentation Fault, if you are use _exit() , program exit in quick mode. From http://msdn.microsoft.com/en-us/library/6wdz5232.aspx you have