user11680003
user11680003

Reputation:

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

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?

Upvotes: 2

Views: 337

Answers (1)

dbush
dbush

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

Related Questions