aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-12-08 15:20:01 +0100
committerDmitry Vyukov <dvyukov@google.com>2016-12-08 17:38:31 +0100
commit9c94dffdc595729e4c1f1cc7675c47974fc9eee0 (patch)
tree0c26c092409a0a39259b97a1ab5d212059d88c1b /executor/executor.cc
parentebfa6e169e01bb909cc301becb623e780f40fab7 (diff)
executor: handle exit failures
See the added comment for explanation.
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 677d2919f..4e957c80e 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -16,7 +16,6 @@
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
-#include <sys/mman.h>
#include <sys/prctl.h>
#include <sys/reboot.h>
#include <sys/stat.h>
@@ -229,7 +228,7 @@ void loop()
close(kOutPipeFd);
execute_one();
debug("worker exiting\n");
- exit(0);
+ doexit(0);
}
debug("spawned worker pid %d\n", pid);