(sagittarius pty) - Pseudo Terminal

Library (sagittarius pty)

This library provides pseudo terminal capabilities.

Function pty? obj

Returns #t if the obj is pty object, otherwise #f.

Function make-pty

Creates PTY object.

Function pty-closed? ( pty pty? )

Returns #t if the pty is closed, otherwise #f.

Function pty-spawn! ( pty pty? ) ( name string? ) ( args list? ) :key ( directory #f ) ( user #f )

Spawn a process of name command with args in the pty.

directory keyword argument specifies the process's working directory.
user keyword argument specifies the owner process.

Function pty-close! ( pty pty? )

Closes the given pty.

Function pty-resize! ( pty pty? ) ( cols fixnum? ) ( rows fixnum? )

Resize the pty with cols and rows value.

Function pty-input-port ( pty pty? )

Returns the binary input port of the pty.

Putting a value into this port means sending standard input value to the underlying process of the pty.

Function pty-output-port ( pty pty? )

Returns the binary output port of the pty.

Reading value from this port means, recieving standard out value from the underlying process of the pty.

Function pty-pid ( pty pty? )

Returns PID of the pty.

Function pty-tcsetattr! ( pty pty? ) ( termios termios? )

Sets the termios into the pty.

Function pty-termios ( pty pty? )

Retrieves the termios from the pty.