From: Richard W.M. Jones Date: Fri, 19 Mar 2010 17:21:05 +0000 (+0000) Subject: Change some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE). X-Git-Tag: 1.0.87~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=5d90acbe4b670e14084bbe9d11b717bfb6d95603;p=libguestfs.git Change some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE). --- diff --git a/src/guestfs.c b/src/guestfs.c index 3910895..e6fcb0e 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -1287,7 +1287,7 @@ guestfs__launch (guestfs_h *g) if (dup (wfd[0]) == -1) { dup_failed: perror ("dup failed"); - _exit (1); + _exit (EXIT_FAILURE); } if (dup (rfd[1]) == -1) goto dup_failed; @@ -1307,7 +1307,7 @@ guestfs__launch (guestfs_h *g) execv (g->qemu, g->cmdline); /* Run qemu. */ perror (g->qemu); - _exit (1); + _exit (EXIT_FAILURE); } /* Parent (library). */ @@ -1339,11 +1339,11 @@ guestfs__launch (guestfs_h *g) */ 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); }