chicken-users
[Top][All Lists]
Advanced

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

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


From: felix winkelmann
Subject: Re: [Chicken-users] Can't get exit values of (process...)?
Date: Wed, 17 Jan 2007 11:26:27 +0100

On 1/17/07, Robin Lee Powell <address@hidden> wrote:
On Sun, Jan 14, 2007 at 09:53:00PM -0800, Robin Lee Powell wrote:
>
> The only way I see to get the exit value of something I call with
> (process...) is to use (process-wait), but as I mentioned in another
> mail, this errors out my entire program if the process is already
> finished, so I can't see any way to do all of the following:
>

If you start a subprocess with `process', the waitpid(2) is done by closing
the input and output port returned. If you want to get at the exit-status,
you should try to start a process via more primitive functions, like
`process-fork'. There a `process-wait' gives you all necessary information
(and the error can be caught using `handle-exceptions'). To get
at stdin/out, one can use the usual fork/dup/exec dance to obtain
file-descriptors (albeit in Scheme using the functionality in the posix unit).


cheers,
felix




reply via email to

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