From a919944372d887ec6ea094621c4f0d4dc6dbf36a Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 27 Dec 2017 11:53:41 +0100 Subject: [PATCH] Use _exit() instead of exit() in child process exit() should not be called from within a child process, since it would call functions registered with atexit(), and flush stdio streams. Use _exit() instead. --- app/src/unix/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/unix/command.c b/app/src/unix/command.c index 70dbd91b..776e0167 100644 --- a/app/src/unix/command.c +++ b/app/src/unix/command.c @@ -14,7 +14,7 @@ pid_t cmd_execute(const char *path, const char *const argv[]) { if (pid == 0) { execvp(path, (char *const *)argv); perror("exec"); - exit(1); + _exit(1); } return pid; }