SIGIO question

carroll at s.cs.uiuc.edu carroll at s.cs.uiuc.edu
Wed May 24 02:09:00 AEST 1989


(Originally in comp.windows.x, but the basic problem is more UNIX related).

Setup: Program Q, which has a single file descriptor open which is a socket.
There is an interupt handler attached to SIGIO which reads the socket and
deals with the data. During normal execution, another function is called
which writes on the socket and expects a reply, and so also does a read().

Question: What happens? Which read succeeds? Is it system dependent? How can
I work around this? Currently I uninstall the signal handler, do the function
call, and re-install it. There must be a better way.

P.S. No, I can't change things to work in a more sensible fashion. See
comp.windows.x for a more detailed description.

Alan M. Carroll                "And there you are
carroll at s.cs.uiuc.edu           Saying 'We have the Moon, so now the Stars...'"
CS Grad / U of Ill @ Urbana    ...{ucbvax,pur-ee,convex}!s.cs.uiuc.edu!carroll



More information about the Comp.unix.wizards mailing list