diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-28 21:00:18 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-28 21:00:18 +0200 |
commit | 639ebc2ff93adca5eb9e12d70a2e9e19731c84ba (patch) | |
tree | f7633ad191f4645822ddcc2e15091bacb8b2fa4c | |
parent | dd11507cdf837ccab676b35b108c0af4729a9213 (diff) | |
download | fastd-639ebc2ff93adca5eb9e12d70a2e9e19731c84ba.tar fastd-639ebc2ff93adca5eb9e12d70a2e9e19731c84ba.zip |
More daemonize cleanup
-rw-r--r-- | src/fastd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fastd.c b/src/fastd.c index f72b351..9f1f60b 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -507,9 +507,6 @@ static int daemonize(void) { if (pipe(pipefd)) exit_errno("pipe"); - fastd_setfd(pipefd[0], FD_CLOEXEC, 0); - fastd_setfd(pipefd[1], FD_CLOEXEC, 0); - pid_t fork1 = fork(); if (fork1 < 0) { @@ -547,6 +544,7 @@ static int daemonize(void) { } else { /* child 2 */ + fastd_setfd(pipefd[1], FD_CLOEXEC, 0); return pipefd[1]; } } |