From: Avi Kivity Subject: Re: Re: [Qemu-devel] [PATCH 01/13] Handle terminating signals. Date: Tue, 26 Aug 2008 17:52:14 +0300 Message-ID: <48B4189E.80807@qumranet.com> References: <1219336054-15919-1-git-send-email-kraxel@redhat.com> <1219336054-15919-2-git-send-email-kraxel@redhat.com> <18611.56975.584280.471257@mariner.uk.xensource.com> <48B3F411.2020306@redhat.com> <18611.63711.631859.280983@mariner.uk.xensource.com> <48B4027C.1000008@codemonkey.ws> <18612.1900.73781.314743@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <18612.1900.73781.314743@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, Gerd Hoffmann , Anthony Liguori List-Id: xen-devel@lists.xenproject.org Ian Jackson wrote: >> In KVM, we sleep for 1s in select() and use signalfd() to receive the >> aio notifications. For older hosts, we emulate signalfd using a thread >> and the pipe-to-self trick. >> > > Why does it need a thread ? You can just write to the pipe in the > signal handler. I'll post my code. > Not sure that it matters, but the semantics are slightly different: with a thread you don't get EINTR in random syscalls as the signal thread is the only one that has the signals unblocked. -- error compiling committee.c: too many arguments to function