Re: [linux-audio-dev] deblocking snd_seq_event_input()

From: Fons Adriaensen <fons.adriaensen@email-addr-hidden>
Date: Fri May 06 2005 - 15:07:00 EEST

On Fri, May 06, 2005 at 09:36:23AM +0200, Clemens Ladisch wrote:

> > Is there a simple (i.e. simpler than getting the pollfd and using them)
> > to force snd_seq_event_input() in blocking mode to return, so the the
> > calling thread can close the handle and cleanup ?
>
> You could try to send this thread a signal, but I don't know how well
> signals and threads work together.
>
> Otherwise, if you want to wait for an event other than "sequencer
> event received", you must use poll.

I see. Still I find this strange. Shouldn't a call that waits on fd
return with an error code when that fd is closed ? If it doesn't, what
is supposed to happen to the calling thread ? Could it still wake up
if the fd is re-used afterwards ?

Since snd_seq_event_input() probably uses poll() internally, why
doesn't it test for POLLERR,-HUP,-NVAL ?

-- 
FA
Received on Fri May 6 16:15:07 2005

This archive was generated by hypermail 2.1.8 : Fri May 06 2005 - 16:15:07 EEST