From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFLVp-0004hf-SE for qemu-devel@nongnu.org; Thu, 28 Apr 2011 03:19:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFLVp-0001Yy-21 for qemu-devel@nongnu.org; Thu, 28 Apr 2011 03:19:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFLVo-0001Yh-OA for qemu-devel@nongnu.org; Thu, 28 Apr 2011 03:19:45 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3S7Jh8f019432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 28 Apr 2011 03:19:43 -0400 Message-ID: <4DB914E3.7000107@redhat.com> Date: Thu, 28 Apr 2011 09:18:59 +0200 From: Jes Sorensen MIME-Version: 1.0 References: <1303907511-4092-1-git-send-email-Jes.Sorensen@redhat.com> <1303907511-4092-2-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] Add dd-style SIGUSR1 progress reporting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, qemu-devel@nongnu.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