mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
CODING_STYLE: clarify that exit() is never OK to call
This commit is contained in:
parent
f4ac4d1a82
commit
3dbafa39b0
@ -226,3 +226,9 @@
|
||||
instead of just this:
|
||||
|
||||
unlink("/foo/bar/baz");
|
||||
|
||||
- Don't invoke exit(), ever. It is not replacement for proper error
|
||||
handling. Please escalate errors up your call chain, and use normal
|
||||
"return" to exit from the main function of a process. If you
|
||||
fork()ed off a child process, please use _exit() instead of exit(),
|
||||
so that the exit handlers are not run.
|
||||
|
Loading…
Reference in New Issue
Block a user