KetraTerm
API · DevelopmentAll versions

createLocalPty

Creates a local PTY process and an attached session without consuming output.

Publish the session to its host before calling TerminalSession.start with the initial dimensions from options. This ensures startup output cannot overtake host registration. The caller owns the returned session and must close it even if publication fails or it is never started. Use localPty when no host registration is needed before output delivery.

Throws

if the terminal width is below TerminalBuffers.MIN_WIDTH, before process creation.

if the process cannot be started.