[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [Qemu-devel] [PATCH 01/13] Handle terminating signal

From: Jamie Lokier
Subject: Re: [Xen-devel] Re: [Qemu-devel] [PATCH 01/13] Handle terminating signals.
Date: Tue, 26 Aug 2008 18:49:19 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Avi Kivity wrote:
> 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.

You shouldn't be getting spurious EINTRs if the signal handlers are
registered with SA_RESTART.  I doubt if any useful host which has
threads does not have SA_RESTART.

-- Jamie

reply via email to

[Prev in Thread] Current Thread [Next in Thread]