[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] Add dd-style SIGUSR1 progress reporting
From: |
Jes Sorensen |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] Add dd-style SIGUSR1 progress reporting |
Date: |
Thu, 28 Apr 2011 09:18:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 |
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