1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-06 00:58:48 +03:00

fix exit status; always print message on child failure

This commit is contained in:
Alasdair Kergon 2007-01-19 18:08:36 +00:00
parent fcdf2e09a2
commit 919ab64fdb

View File

@ -1558,22 +1558,19 @@ static void _daemonize(void)
/* Problem with child. Determine what it is by exit code */
switch (WEXITSTATUS(child_status)) {
case EXIT_LOCKFILE_INUSE:
fprintf(stderr, "Another dmeventd daemon is already running\n");
break;
case EXIT_DESC_CLOSE_FAILURE:
break;
case EXIT_DESC_OPEN_FAILURE:
break;
case EXIT_OPEN_PID_FAILURE:
break;
case EXIT_FIFO_FAILURE:
break;
case EXIT_CHDIR_FAILURE:
break;
default:
fprintf(stderr, "Child exited with code %d\n", WEXITSTATUS(child_status));
break;
}
exit(child_status);
exit(WEXITSTATUS(child_status));
}
if (chdir("/"))