From: "Michael S. Tsirkin" <mst@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 02/10] slirp: check system() success
Date: Thu, 4 Mar 2010 11:20:24 +0200 [thread overview]
Message-ID: <20100304092024.GA1535@redhat.com> (raw)
In-Reply-To: <93c1dcb48b0cfa33775fc45a1ffb9c0edb44d833.1267692963.git.quintela@redhat.com>
On Thu, Mar 04, 2010 at 10:00:31AM +0100, Juan Quintela wrote:
> we shouldn't call W*() macros until we check that fork worked.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> net/slirp.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/slirp.c b/net/slirp.c
> index 317cca7..7f846ec 100644
> --- a/net/slirp.c
> +++ b/net/slirp.c
> @@ -472,7 +472,7 @@ static void slirp_smb_cleanup(SlirpState *s)
> if (s->smb_dir[0] != '\0') {
> snprintf(cmd, sizeof(cmd), "rm -rf %s", s->smb_dir);
> ret = system(cmd);
> - if (!WIFEXITED(ret)) {
> + if (ret == -1 || !WIFEXITED(ret)) {
> qemu_error("'%s' failed.\n", cmd);
> } else if (WEXITSTATUS(ret)) {
> qemu_error("'%s' failed. Error code: %d\n",
> --
> 1.6.6.1
>
>
next prev parent reply other threads:[~2010-03-04 9:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 9:00 [Qemu-devel] [PATCH v2 00/10] FORTIFY_SOURCE followup Juan Quintela
2010-03-04 9:00 ` [Qemu-devel] [PATCH 01/10] cow: return errno instead of -1 Juan Quintela
2010-03-09 17:45 ` Anthony Liguori
2010-03-04 9:00 ` [Qemu-devel] [PATCH 02/10] slirp: check system() success Juan Quintela
2010-03-04 9:20 ` Michael S. Tsirkin [this message]
2010-03-04 9:00 ` [Qemu-devel] [PATCH 03/10] qcow2: return errno instead of -1 Juan Quintela
2010-03-04 9:00 ` [Qemu-devel] [PATCH 04/10] qcow: " Juan Quintela
2010-03-04 9:00 ` [Qemu-devel] [PATCH 05/10] vmdk: " Juan Quintela
2010-03-04 9:00 ` [Qemu-devel] [PATCH 06/10] vmdk: make vmdk_snapshot_create return -errno Juan Quintela
2010-03-04 9:00 ` [Qemu-devel] [PATCH 07/10] vmdk: fix double free Juan Quintela
2010-03-04 9:00 ` [Qemu-devel] [PATCH 08/10] vmdk: share cleanup code Juan Quintela
2010-03-04 9:00 ` [Qemu-devel] [PATCH 09/10] block: print errno on error Juan Quintela
2010-03-04 9:00 ` [Qemu-devel] [PATCH 10/10] documentation: qemu_write_full don't work with non-blocking fd's Juan Quintela
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=20100304092024.GA1535@redhat.com \
--to=mst@redhat.com \
--cc=qemu-devel@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).