[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH] Change some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE).



-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
>From 1cb5de862a92322b3c8c682324b865fb2be5368c Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones redhat com>
Date: Fri, 19 Mar 2010 17:19:49 +0000
Subject: [PATCH] Change some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE).

---
 src/guestfs.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/guestfs.c b/src/guestfs.c
index 02d5fdb..729b687 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -1268,7 +1268,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;
@@ -1288,7 +1288,7 @@ guestfs__launch (guestfs_h *g)
 
     execv (g->qemu, g->cmdline); /* Run qemu. */
     perror (g->qemu);
-    _exit (1);
+    _exit (EXIT_FAILURE);
   }
 
   /* Parent (library). */
@@ -1320,11 +1320,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);
       }
-- 
1.6.5.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]