These procedures are in structures Open-pipecreates a new pipe
and returns the two ends as an input port and an output port. A
file descriptor port (or is a port that reads to or writes from
an OS file descriptor. Fd-ports are returned by open-pipe, and
other procedures. Fd-port?returns true if its argument is an fd-
port. Port->fdreturns the file descriptor associated with or
portis not an fd-port. Remap-file-descriptorsreassigns file
descriptors to ports. The fd-specsindicate which port is to be
mapped to each file descriptor: the first gets file descriptor
0, the second gets 1, and so forth. A fd-specis either a port
that reads from or writes to a file descriptor, or #findicating
that the corresponding file descriptor is not used. Any open
ports not listed are marked `close-on-exec'. The same port may
be moved to multiple new file descriptors. moves the current
output port to file descriptor(remap-file-descriptors (current-
output-port) #f (current-input-port)) 0and the current input
port to file descriptor