On Thu, 2002-05-23 at 09:29, Rocco Caputo wrote:
> On Mon, Jan 21, 2002 at 02:28:50PM -0700, Chris Fedde wrote:
> > 
> > I've fantasized about two interfaces.  First would be to put the
> > string 'STDIN' or 'STDERR' (or descriptors 1 or 2) in ARGV4 and
> > assume the user knows that '$_[ARGV1] eq 'read' and $_[ARGV3]==0' is an
> > EOF on a non blocking file handle.
> 
> Committed today, using STDIN, STDOUT, and STDERR instead of the file
> descriptor numbers.

If I understand correctly, together with CloseEvent, this presents a
complete solution.  Let me see if I fully grasp this.

Here is one possible sequence of events:

Event      ARG0 ARG1 ARG3
--------   ---- ---- ------
ErrorEvent read 0    STDERR
sigchild   CHLD $pid
ErrorEvent read 0    STDOUT
ErrorEvent read 0    STDIN
CloseEvent 

Now it's possible to detect EOF of an individual file handle.  It's also
possible to know when all file handles are closed without counting them.

Is this conclusion accurate?

Pete


Reply via email to