[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: |
Robin Lee Powell |
Subject: |
Re: [Chicken-users] Can't get exit values of (process...)? |
Date: |
Wed, 17 Jan 2007 11:16:24 -0800 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Wed, Jan 17, 2007 at 11:26:27AM +0100, felix winkelmann wrote:
> 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).
The problem is, the programs I'm calling tend to complete the
instant I gather their output. If the program is gone by the time I
call process-wait, I don't get the exit status, so this really
doesn't help me.
I'm looking for something like the shell's $? here. Can I maybe
hack process to do that?
-Robin
--
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
Reason #237 To Learn Lojban: "Homonyms: Their Grate!"
Proud Supporter of the Singularity Institute - http://singinst.org/
- [Chicken-users] Can't get exit values of (process...)?, Robin Lee Powell, 2007/01/15
- Re: [Chicken-users] Can't get exit values of (process...)?, Robin Lee Powell, 2007/01/17
- Re: [Chicken-users] Can't get exit values of (process...)?, felix winkelmann, 2007/01/17
- Re: [Chicken-users] Can't get exit values of (process...)?,
Robin Lee Powell <=
- Re: [Chicken-users] Can't get exit values of (process...)?, Zbigniew, 2007/01/17
- Re: [Chicken-users] Can't get exit values of (process...)?, Robin Lee Powell, 2007/01/17
- Re: [Chicken-users] Can't get exit values of (process...)?, Kon Lovett, 2007/01/17
- Re: [Chicken-users] Can't get exit values of (process...)?, Zbigniew, 2007/01/17
- Re: [Chicken-users] Can't get exit values of (process...)?, John Cowan, 2007/01/17
- Re: [Chicken-users] Can't get exit values of (process...)?, Zbigniew, 2007/01/17
- [Chicken-users] Re: Removing wait from process, Kon Lovett, 2007/01/17
- [Chicken-users] Re: Removing wait from process, felix winkelmann, 2007/01/18
- [Chicken-users] Re: Removing wait from process, Kon Lovett, 2007/01/18
- Re: [Chicken-users] Can't get exit values of (process...)?, felix winkelmann, 2007/01/18