[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Can't get exit values of (process...)?

From: John Cowan
Subject: Re: [Chicken-users] Can't get exit values of (process...)?
Date: Wed, 17 Jan 2007 17:43:03 -0500
User-agent: Mutt/1.3.28i

Zbigniew scripsit:

> But you might have more success arguing that "process" should not ever
> invoke a wait() call when you close its ports, and instead leave that
> up to the user.  Since you receive the PID from "process", you can
> process-wait on it, and retrieve the error code yourself.  This way,
> process does the dirty work of setting up and tearing down a new
> process and bi-directional pipes, while you can do the easy work of
> wait().

Furthermore, this makes for a sensible approach to disposition.  You get
three values back from "process", two ports and a PID.  It's up to you
to close each port and wait on the PID in order to properly
dispose of everything.

> What do people think?  Should the wait() be removed from process?

Yes, I'd say so; it's not hard to insert a call to "wait" right after
closing the input port.

John Cowan  address@hidden
Big as a house, much bigger than a house, it looked to [Sam], a grey-clad
moving hill.  Fear and wonder, maybe, enlarged him in the hobbit's eyes,
but the Mumak of Harad was indeed a beast of vast bulk, and the like of him
does not walk now in Middle-earth; his kin that live still in latter days are
but memories of his girth and his majesty.  --"Of Herbs and Stewed Rabbit"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]