I am trying to understand how the :pty option to run-program works. What I would like is to run a program using a pty and have the child inherit all of the parent's streams.

When I try to run cat for example, I get

* (run-program "cat" nil :pty t :input t :output t :error t)


Is this not the correct way to make the child inherit from the parent? Or will I have to write some code to pass data back and forth from the standard streams and the pty?

Also, when I pass :pty *standard-output*, I get the following error (tested on Linux/SBCL 1.0.20 and Mac/SBCL 1.0.25):

* (run-program "cat" nil :pty *standard-output* :input t :output t :error t)

debugger invoked on a SB-INT:SIMPLE-PROGRAM-ERROR:
  invalid number of arguments: 3

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.


Thanks. Any assistance would be appreciated.

Elliott Slaughter

"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay