summaryrefslogtreecommitdiffstats
path: root/bind.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-01-29 13:01:29 +0000
committerRoy Marples <roy@marples.name>2009-01-29 13:01:29 +0000
commitf22fb9b1c1232dd0385a00d7eb8ad0dbc172dc07 (patch)
treef886e73a43b66ad78b3e4be0d6e15d322a586427 /bind.c
parented913a59775402a9ce66067858d7280fe4506176 (diff)
downloaddhcpcd-f22fb9b1c1232dd0385a00d7eb8ad0dbc172dc07.tar.xz
Clean up compiler warnings from overly pedantic checking.
Diffstat (limited to 'bind.c')
-rw-r--r--bind.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bind.c b/bind.c
index 1b34ffd6..483c7462 100644
--- a/bind.c
+++ b/bind.c
@@ -79,7 +79,8 @@ daemonise(void)
setsid();
/* Notify parent it's safe to exit as we've detached. */
close(sidpipe[0]);
- write(sidpipe[1], &buf, 1);
+ if (write(sidpipe[1], &buf, 1) == -1)
+ syslog(LOG_ERR, "failed to notify parent: %m");
close(sidpipe[1]);
if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
dup2(fd, STDIN_FILENO);
@@ -93,7 +94,8 @@ daemonise(void)
signal_reset();
/* Wait for child to detach */
close(sidpipe[1]);
- read(sidpipe[0], &buf, 1);
+ if (read(sidpipe[0], &buf, 1) == -1)
+ syslog(LOG_ERR, "failed to read child: %m");
close(sidpipe[0]);
break;
}