chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] close-input-pipe return value


From: felix winkelmann
Subject: Re: [Chicken-users] close-input-pipe return value
Date: Mon, 20 Jun 2005 21:32:19 +0200

On 6/20/05, Zbigniew <address@hidden> wrote:
> Oh---for those without the chicken manual at their fingertips---in
> (with-input-from-pipe COMMAND THUNK) the error code from COMMAND is
> not available until after THUNK finishes and the pipe is closed.  And
> with-input-from-pipe just returns the results of THUNK.  That is why
> returning an error code would have to be done out of band (should it
> be deemed desirable.)
> 

To be honest, I can't think of anything better than returning the status code
in the moment.

Here the obvious patch:

713c713,714
<       (when (eq? -1 r) (posix-error #:file-error 'close-input/output-pipe
"error while closing pipe" port)) ) ) )
---
>       (when (eq? -1 r) (posix-error #:file-error 'close-input/output-pipe 
> "error while closing pipe" port))
>       r) ) )


cheers,
felix




reply via email to

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