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

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!

If someone locates my lost marbles, would you mind returning them? I
need them urgently!

Cheers,
Jes

  reply	other threads:[~2011-04-28  7:19 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 [this message]
2011-04-28 12:04       ` Paolo Bonzini
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=4DB914E3.7000107@redhat.com \
    --to=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.