aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-29 00:59:19 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-29 00:59:19 +0100
commitd679ea3129781ef564c1f91194104ce7692bb102 (patch)
tree966f69d63bd1c5b1229aa99ee4378e6e0f50e74d /src/daemon.c
parentreopen state file, we will use flock on it, so all processes need their own open file descriptor for it (diff)
downloadsat-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.c5
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)