Skip to main content

Module pty

Module pty 

Source
Expand description

PTY abstraction โ€” spawn processes on a pseudo-terminal, async read/write.

Wraps portable-pty to provide an async-friendly handle with:

  • Spawning commands on a PTY (with cwd, env, size)
  • Non-blocking reads via a background reader thread + mpsc channel
  • Synchronous writes to the PTY master
  • Resize support
  • Alive-check and graceful cleanup on Drop

Structsยง

PtyHandle
Async-friendly wrapper around a PTY master/child pair.