[plt-scheme] null-port ? and system*/exit-code

From: Paulo J. Matos (pocm at soton.ac.uk)
Date: Sat Mar 10 12:11:09 EST 2007

Hello all,

I'm using system*/exit-code but all output from the command is being
directed to the output-port which I don't want to. I'd prefer having
it ignored (sent to /dev/null or something). I tried defining a null
port and using parameterize on the current-output-port. But it didn't
work:
(define null-port (make-parameter (make-output-port 'null-port
                                                      always-evt
                                                      (lambda (bstr
soffset eoffset notblock? break?) 0)
                                                      (lambda () (void)))))
(parameterize ((current-output-port (null-port)))
    (display "buh"))
. user port write: bad result for non-flush write: 0

Any ideas on how to define a null-port or ignore output from command
in system*/exit-port?

Cheers,
-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK


Posted on the users mailing list.