From: Christian Brauner Date: Mon, 26 Feb 2018 10:21:51 +0000 (+0100) Subject: CODING_STYLE: add section about _exit() X-Git-Tag: lxc-2.0.10~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6123af191c048e7cc96e73b00e517347e82964d;p=thirdparty%2Flxc.git CODING_STYLE: add section about _exit() Signed-off-by: Christian Brauner --- diff --git a/CODING_STYLE.md b/CODING_STYLE.md index 64974fa84..a3bf41a4a 100644 --- a/CODING_STYLE.md +++ b/CODING_STYLE.md @@ -512,3 +512,8 @@ rules to use them: Signed-off-by: Christian Brauner ``` +#### Use `_exit()` To Terminate `fork()`ed Child Processes + +- When `fork()`ing off a child process use `_exit()` to terminate it instead of + `exit()`. The `exit()` function is not thread-safe and thus not suited for + the shared library which must ensure that it is thread-safe.