diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-02 12:14:43 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-02 12:17:41 +0200 |
commit | 3dbafa39b08025350e7b17f4874a343c789ff9b3 (patch) | |
tree | 3b0462703f72a8937b2d0dc0445f37ff587ccff1 /CODING_STYLE | |
parent | f4ac4d1a82e2c468761fffa333323841ad886221 (diff) |
CODING_STYLE: clarify that exit() is never OK to call
Diffstat (limited to 'CODING_STYLE')
-rw-r--r-- | CODING_STYLE | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CODING_STYLE b/CODING_STYLE index b687e729f4..1748dc4bc4 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -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. |