diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 00:59:19 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 00:59:19 +0100 |
commit | d679ea3129781ef564c1f91194104ce7692bb102 (patch) | |
tree | 966f69d63bd1c5b1229aa99ee4378e6e0f50e74d /src/daemon.c | |
parent | reopen state file, we will use flock on it, so all processes need their own open file descriptor for it (diff) | |
download | sat-d679ea3129781ef564c1f91194104ce7692bb102.tar.gz sat-d679ea3129781ef564c1f91194104ce7692bb102.tar.bz2 sat-d679ea3129781ef564c1f91194104ce7692bb102.tar.xz |
fix errors
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/daemon.c')
-rw-r--r-- | src/daemon.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/daemon.c b/src/daemon.c index 75e0f36..8221d6a 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -20,9 +20,6 @@ * DEALINGS IN THE SOFTWARE. */ #include "daemon.h" -#include <unistd.h> -#include <stdio.h> -#include <fcntl.h> @@ -148,7 +145,7 @@ reopen(int fd, int oflag) int r, saved_errno; sprintf(path, "/dev/fd/%i", fd); - r = open(fd, oflag); + r = open(path, oflag); if (r < 0) return -1; if (dup2(r, fd) == -1) |