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