[Top][All Lists]

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

[Qemu-trivial] [PATCH] migration: reflect incoming failure to shell

From: Eric Blake
Subject: [Qemu-trivial] [PATCH] migration: reflect incoming failure to shell
Date: Tue, 16 Apr 2013 15:50:41 -0600

Management apps like libvirt don't know to pay attention to
stderr unless there is a non-zero exit status.

* migration.c (process_incoming_migration_co): Exit with non-zero
status on failure.

Signed-off-by: Eric Blake <address@hidden>

Noticed while reviewing:
and it seems blatant enough to fix now, rather than waiting for
Pavel's series to stabilize.

Side note: libvirt explicitly forbids all use of exit({0,1}), and
instead encourages exit(EXIT_{SUCCESS,FAILURE}), precisely because
it makes it harder to slip in unintentional successful exits.

 migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration.c b/migration.c
index 3b4b467..3eb0fad 100644
--- a/migration.c
+++ b/migration.c
@@ -99,7 +99,7 @@ static void process_incoming_migration_co(void *opaque)
     if (ret < 0) {
         fprintf(stderr, "load of migration failed\n");
-        exit(0);
+        exit(EXIT_FAILURE);
     DPRINTF("successfully loaded vm state\n");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]