The difference between output and quick_exit

What is the difference between void quick_exit( int exit_code )that which was included in standard c11 and the function void exit( int exit_code )that already existed before standard c11?

+4
source share
3 answers

exitensures that stream buffers are flushed, closed, etc. This behavior is quick_exitnot specified by the standard.

Using these tools, you can determine two ways to exit the application: one that allows you to complete the full cleanup (performed by functions registered with atexit), and the other so that applications finish faster without reading too many things (calls to functions registered in at_quick_exit).

+4

Linux quick_exit :

quick_exit - ,

quick_exit() ,      , at_quick_exit (3), atexit (3).

exit:

-

exit() , 0377 (. wait (2)).

, , quick_exit .

+3

_Exit, abort, signal quick_exit.

, exit, undefined.

+3
source

Source: https://habr.com/ru/post/1654837/


All Articles