if (dup (wfd[0]) == -1) {
dup_failed:
perror ("dup failed");
- _exit (1);
+ _exit (EXIT_FAILURE);
}
if (dup (rfd[1]) == -1)
goto dup_failed;
execv (g->qemu, g->cmdline); /* Run qemu. */
perror (g->qemu);
- _exit (1);
+ _exit (EXIT_FAILURE);
}
/* Parent (library). */
*/
for (;;) {
if (kill (qemu_pid, 0) == -1) /* qemu's gone away, we aren't needed */
- _exit (0);
+ _exit (EXIT_SUCCESS);
if (kill (parent_pid, 0) == -1) {
/* Parent's gone away, qemu still around, so kill qemu. */
kill (qemu_pid, 9);
- _exit (0);
+ _exit (EXIT_SUCCESS);
}
sleep (2);
}