[plt-scheme] Noticeable absence of (with-output-to-port ...) and (with-input-from-port ...)

From: hendrik at topoi.pooq.com (hendrik at topoi.pooq.com)
Date: Thu Sep 11 11:19:23 EDT 2008

On Thu, Sep 11, 2008 at 09:36:30AM -0400, Ernie Smith wrote:
> I was looking to redirect intput and output of existing
> scheme functions to pipes.

This isn't portable, but in 
http://www.informit.com/articles/article.aspx?p=99706&seqNum=15
it says:

* 3.15 /dev/fd
*
* Newer systems provide a directory named /dev/fd whose entries are 
* files named 0,1, 2, and so on. Opening the file /dev/fd/n is 
* equivalent to duplicating descriptor n (assuming that descriptor n is 
* open).
*
* The /dev/fd feature was developed by Tom Duff and appeared in the 8th 
* Edition of the Research Unix System. It is supported by SVR4 and 
* 4.3+BSD. It is not part of POSIX.1.

/dev/fd/0, /dev/fd/1, etc. seem to be part of my Debian Lenny system.

-- hendrik


Posted on the users mailing list.