c - exit() vs _exit() : Does calling _exit() ensures closing of all open fd and sockets? -



c - exit() vs _exit() : Does calling _exit() ensures closing of all open fd and sockets? -

i have used exit() terminate process. not have exit handlers registered not care flushing buffers on exit, thought of using _exit() more robust method terminate process.

the question is, _exit() handles closing of open file descriptors , open sockets gracefully?

the function exit calls _exit. tlpi:

the next actions performed exit():

exit handlers called the stdio stream buffers flushed the _exit() scheme phone call invoked

the standard page _exit says this:

all of file descriptors, directory streams, conversion descriptors, , message catalog descriptors open in calling process shall closed.

c linux exit

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -