how do I know when a process wants data
Christopher J S Vance
cjsv at cs.adfa.oz.au
Mon Oct 9 18:10:17 AEST 1989
I want to run a process (call it dexec) which fork's and exec's an
ordinary Unix process (call it X) using a file descriptor shared with
dexec. I want dexec to be notified that X is blocked waiting for input
from the shared fd, but cannot expect that X even knows anything is
happening. In particular, I cannot compile X, but can compile dexec.
The assumption is that dexec can perform some operation to make data
appear on the shared fd (although dexec won't be reading this data
itself). Another reason for sharing the fd is that I want dexec to know
how many characters are left on the fd when X terminates.
What mechanism(s) should/can I use to do this? I would rather not poll,
but it seems that select does the exact opposite of what I want, since I
want to be notified when there is *no* data to read.
What are the exceptional conditions alluded to in the documentation for
select(2)? Might these help me? In which case, where are they
documented?
I am running several different varieties of Berklix, as hacked by
Pyramid (4.0, 4.4), Sun (3.5, 4.0.3), and Convex (?), and am after a
generic solution, because it's supposed to be part of a distributed
execution system.
Thanks for all responses.
More information about the Comp.unix.wizards
mailing list