qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, rth@twiddle.net,
	alex.bennee@linaro.org, f4bug@amsat.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 for-3.0] tests/libqtest: Improve kill_qemu()
Date: Mon, 30 Jul 2018 16:26:16 -0500	[thread overview]
Message-ID: <720e8737-7b43-c3c4-f8f8-30b68e5a2709@redhat.com> (raw)
In-Reply-To: <a040b798-b864-c48a-2a8c-c19565f262ca@redhat.com>

On 07/24/2018 01:44 AM, Thomas Huth wrote:

>>
>> Furthermore, we are NOT detecting EINTR (while EINTR shouldn't be
>> happening if we didn't install signal handlers, it's still better
>> to always be robust), and also want to log unexpected non-zero status
>> that was not accompanied by a core dump.
>>

>>           kill(s->qemu_pid, SIGTERM);
>> +    retry:
>>           pid = waitpid(s->qemu_pid, &wstatus, 0);
>> +        if (pid == -1 && errno == EINTR) {
>> +            goto retry;
>> +        }
> 
>      do {
>          pid = waitpid(s->qemu_pid, &wstatus, 0);
>      } while (pid == -1 && errno == EINTR);
> 
> ?
> 
> Or use the TFR macro from include/qemu-common.h ?

Cool, I didn't know that macro existed! Will send v3.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

      reply	other threads:[~2018-07-30 21:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23 19:35 [Qemu-devel] [PATCH v2 for-3.0] tests/libqtest: Improve kill_qemu() Eric Blake
2018-07-23 20:20 ` Richard Henderson
2018-07-24  6:36 ` Markus Armbruster
2018-07-24 14:35   ` Eric Blake
2018-07-25 16:17     ` Markus Armbruster
2018-07-30 21:24       ` Eric Blake
2018-07-31  5:35         ` Markus Armbruster
2018-07-24  6:44 ` Thomas Huth
2018-07-30 21:26   ` Eric Blake [this message]

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=720e8737-7b43-c3c4-f8f8-30b68e5a2709@redhat.com \
    --to=eblake@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@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).