]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
CODING_STYLE: add section about _exit()
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 26 Feb 2018 10:21:51 +0000 (11:21 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 23 Aug 2018 20:30:54 +0000 (22:30 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
CODING_STYLE.md

index 64974fa842a0055d0bf78d6e5328e6acb73b1356..a3bf41a4acab7d91b001939f539d64b0cadad44d 100644 (file)
@@ -512,3 +512,8 @@ rules to use them:
       Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
 
   ```
+#### 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.