From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42190 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq7J3-0002JD-KX for qemu-devel@nongnu.org; Thu, 17 Feb 2011 12:06:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pq7Is-0000G7-Ns for qemu-devel@nongnu.org; Thu, 17 Feb 2011 12:06:07 -0500 Received: from mail-ew0-f45.google.com ([209.85.215.45]:44508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pq7Is-0000G1-IM for qemu-devel@nongnu.org; Thu, 17 Feb 2011 12:06:06 -0500 Received: by ewy10 with SMTP id 10so1146408ewy.4 for ; Thu, 17 Feb 2011 09:06:05 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4D5D557A.2060109@redhat.com> Date: Thu, 17 Feb 2011 18:06:02 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1297959841-41235-1-git-send-email-gingold@adacore.com> In-Reply-To: <1297959841-41235-1-git-send-email-gingold@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Use sigwait instead og sigwaitinfo. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tristan Gingold Cc: qemu-devel@nongnu.org On 02/17/2011 05:24 PM, Tristan Gingold wrote: > - siginfo_t siginfo; > + int sig; > > - err = sigwaitinfo(&info->mask,&siginfo); > + err = sigwait(&info->mask,&sig); This is doable but the patch is wrong, after sigwaitinfo "err" is the signal number, so you should replace memcpy(buffer, &err, sizeof(err)); further down with memcpy(buffer, &sig, sizeof(sig)); Paolo