Reputation:
I'm new to C and Linux, just a question on system calls:
so why _exit
has an underscore prefix while others don't have?
Upvotes: 2
Views: 337
Reputation: 223972
The system call _exit
is so named to differentiate it from the library function exit
.
Programs should in most cases use the exit
library call to terminate the process. This function calls any atexit
handlers that were registered before calling _exit
internally which actually terminates the process.
Upvotes: 3