close-input-pipe discards the return value of the process you invoked, so you can't figure out if it failed. It only signals an error (via exception) if the system call failed.
In Perl, close(pipe) will fail on a non-zero exit code (though the code is returned out of band, in $?). An easy fix is to have close-input-pipe return the value from pclose() (stored in the variable "r"), since it currently returns nothing at all. Semantically it makes sense to return #f on failure, but where would you pass the code back? Out-of-band variables, like in Perl, seem wrong in Scheme. Of course, with-input-from-pipe and friends would still not signal an error, this way. I can live with that. They could if an exception were signaled, or a procedure of your choosing were called upon close-input-pipe failure, but both seem a bit heavyweight. I know PROCESS and PROCESS-WAIT can retrieve process codes, but I don't want to use them for various reasons. Any suggestions? Zb _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
