scsh-users
[Top] [All Lists]

Re: more run, scheme code, and exit values questions

To: glenn@mathcs.emory.edu (Glenn Barry)
Subject: Re: more run, scheme code, and exit values questions
From: glenn@mathcs.emory.edu (Glenn Barry)
Date: Thu, 14 Dec 1995 02:26:06 -0500
Cc: scsh@martigny.ai.mit.edu
Organization: Emory University, Dept of Math and CS
Reply-to: glenn@mathcs.emory.edu (Glenn Barry)
|[0.4.2, solaris 2.5]
|
|With a run pipeline, I'd like the final component of the
|pipeline to be a scheme proc like so:
|
|(run (| (unixcmd)
|       (scheme-proc)))

my  mistake here, the above should be

        (run (| (unixcmd)
                (begin (scheme-proc))))

(but it's correct below in the example)

|
|And I would like to return a non-zero value from the scheme-proc
|to indicate an error condition just like with a unix cmd.
|
|But it looks like run will not return the non-zero value
|for the scheme proc.
|
|Here's a simple test:
|
|> (run (grep blah /etc/motd)) ; wrap this in (status:exit-val) to get real val
|256
|> (define (do-it)
|    1)
|> do-it
|'#{Procedure 10555 do-it}
|> (do-it)
|1
|> (run (begin (do-it)))
|0
|
|comments?
|
|thx,
|glenn
|
|
|

<Prev in Thread] Current Thread [Next in Thread>