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 invokedthe 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
Post a Comment