why `_exit` has an underscore prefix while other system calls don't have?

Viewed 138

I'm new to C and Linux, just a question on system calls: enter image description here so why _exit has an underscore prefix while others don't have?

1 Answers

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.

Related