diff options
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) |