From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, pbonzini@redhat.com, phrdina@redhat.com,
quintela@redhat.com
Subject: [Qemu-devel] [PATCH] migration: reflect incoming failure to shell
Date: Tue, 16 Apr 2013 15:50:41 -0600 [thread overview]
Message-ID: <1366149041-626-1-git-send-email-eblake@redhat.com> (raw)
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 <eblake@redhat.com>
---
Noticed while reviewing:
https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03293.html
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)
qemu_fclose(f);
if (ret < 0) {
fprintf(stderr, "load of migration failed\n");
- exit(0);
+ exit(EXIT_FAILURE);
}
qemu_announce_self();
DPRINTF("successfully loaded vm state\n");
--
1.8.1.4
next reply other threads:[~2013-04-16 21:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 21:50 Eric Blake [this message]
2013-04-16 22:03 ` [Qemu-devel] [PATCH] migration: reflect incoming failure to shell Anthony Liguori
2013-04-22 18:35 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1366149041-626-1-git-send-email-eblake@redhat.com \
--to=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=phrdina@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).