sim-card
/
qemu
Archived
10
0
Fork 0

Fix warning in qemu-nbd.c

qemu-nbd.c:349: error: ignoring return value of 'daemon', declared with attribute warn_unused_result

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2009-06-15 12:49:59 -05:00
parent eeb7c03c0f
commit f5de141b34
1 changed files with 6 additions and 2 deletions

View File

@ -345,8 +345,12 @@ int main(int argc, char **argv)
pid_t pid;
int sock;
if (!verbose)
daemon(0, 0); /* detach client and server */
if (!verbose) {
/* detach client and server */
if (daemon(0, 0) == -1) {
errx(errno, "Failed to daemonize");
}
}
if (socket == NULL) {
sprintf(sockpath, SOCKET_PATH, basename(device));