Fix daemon return code

Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
This commit is contained in:
Lon Hohberger 2009-09-17 14:22:21 -04:00
parent 32ef1343db
commit 21dab5b24c

View File

@ -129,7 +129,10 @@ main(int argc, char **argv)
}
if (!foreground) {
daemon(0, 0);
if (daemon(0, 0) < 0) {
printf("Failed to daemonize!\n");
return -1;
}
}
if (p->init(&backend_ctx, config) < 0) {