All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: kwolf@redhat.com, Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] Add dd-style SIGUSR1 progress reporting
Date: Thu, 28 Apr 2011 14:04:32 +0200	[thread overview]
Message-ID: <4DB957D0.9000407@redhat.com> (raw)
In-Reply-To: <4DB914E3.7000107@redhat.com>

On 04/28/2011 09:18 AM, Jes Sorensen wrote:
> On 04/27/11 18:14, Markus Armbruster wrote:
>>> +static void progress_simple_init(void)
>>> +{
>>> +    state.print = progress_simple_print;
>>> +    state.end = progress_simple_end;
>>> +}
>>> +
>>> +#ifdef CONFIG_POSIX
>>> +static void sigusr_print(int signal)
>>> +{
>>> +    printf("    (%3.2f/100%%)\n", state.current);
>>
>> printf() is not async-signal-safe.  I don't think you can safely call it
>> in a signal handler.
>
> Grrrr, you're absolutely right! Back to the drawing board!

Let's add our own version of strtol to QEMU. :)

Paolo

  reply	other threads:[~2011-04-28 12:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 12:31 [Qemu-devel] [PATCH v2 qemu-block 0/2] Add dd-style SIGUSR1 progress reporting Jes.Sorensen
2011-04-27 12:31 ` [Qemu-devel] [PATCH 1/2] " Jes.Sorensen
2011-04-27 16:14   ` Markus Armbruster
2011-04-28  7:18     ` Jes Sorensen
2011-04-28 12:04       ` Paolo Bonzini [this message]
2011-04-27 12:31 ` [Qemu-devel] [PATCH 2/2] Remove obsolete 'enabled' variable from progress state Jes.Sorensen

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=4DB957D0.9000407@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.