diff options
-rw-r--r-- | src/common/Preforker.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/Preforker.h b/src/common/Preforker.h index 07f21b45e46..bda5771d37b 100644 --- a/src/common/Preforker.h +++ b/src/common/Preforker.h @@ -6,6 +6,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <sys/wait.h> +#include <errno.h> #include <unistd.h> #include "common/safe_io.h" @@ -78,7 +79,7 @@ public: void exit(int r) { if (forked) { // tell parent - ::write(fd[1], &r, sizeof(r)); + (void)::write(fd[1], &r, sizeof(r)); } ::exit(r); } @@ -86,7 +87,7 @@ public: void daemonize() { assert(forked); static int r = -1; - ::write(fd[1], &r, sizeof(r)); + (void)::write(fd[1], &r, sizeof(r)); } }; |