From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4TRw-0004RP-D9 for qemu-devel@nongnu.org; Fri, 16 Sep 2011 04:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4TRv-0007Yi-51 for qemu-devel@nongnu.org; Fri, 16 Sep 2011 04:07:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4TRu-0007Ye-Tc for qemu-devel@nongnu.org; Fri, 16 Sep 2011 04:07:03 -0400 Message-ID: <4E7303EC.4070608@redhat.com> Date: Fri, 16 Sep 2011 10:08:12 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <1316107350-31172-1-git-send-email-lersek@redhat.com> <4E724F23.1020901@codemonkey.ws> In-Reply-To: <4E724F23.1020901@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC] main loop: fix some accesses made in sighandler context List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On 09/15/11 21:16, Anthony Liguori wrote: > On 09/15/2011 12:22 PM, Laszlo Ersek wrote: >> http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03_03 > > I don't think you can rely on snprintf being signal safe. I think you > should just exit on failure. > > OpenBSD lists snprintf as signal safe, but "probably not on other systems." I wasn't diligent enough to look up snprintf() in the table I linked myself. In other news, I hold a Programmers' Darwin Award. Will send v2. Thanks, lacos