Syndicate PTY (pseudoterminal) driver, plus protocol schema
Go to file
Tony Garnock-Jones 253df3cea7 Bring up-to-date with latest syndicate-rs 2024-04-10 17:08:36 +02:00
protocols Assertion-based terminal sizing 2023-11-25 23:26:57 +01:00
src Bring up-to-date with latest syndicate-rs 2024-04-10 17:08:36 +02:00
.gitignore Initial commit 2023-11-11 02:03:30 +01:00
Cargo.lock Bring up-to-date with latest syndicate-rs 2024-04-10 17:08:36 +02:00
Cargo.toml Bring up-to-date with latest syndicate-rs 2024-04-10 17:08:36 +02:00
README.md README.md 2023-11-24 10:56:58 +01:00
build.rs Update for latest releases of syndicate/preserves 2024-02-05 23:46:21 +01:00
rust-toolchain Initial commit 2023-11-11 02:03:30 +01:00
server-config.pr Bring up-to-date with latest syndicate-rs 2024-04-10 17:08:36 +02:00

README.md

syndicate-pty-driver

A PTY (pseudoterminal) driver for Syndicate, plus protocol schema for PTY interaction via Syndicate.

Expects to be started from syndicate-server, perhaps via configuration like this:

<require-service <daemon pty>>
<daemon pty { protocol: application/syndicate, argv: "syndicate-pty-driver" }>

It publishes a service object which then speaks the PTY protocol. You can start a program running in a fresh PTY like this:

# As soon as the PTY driver publishes its service object, $cap, ...
? <service-object <daemon pty> ?cap> [
  # ... assert interest in existence of a session with id 1 running `bash -i`.
  $cap += <pty-session 1 [bash -i]>
]

Then, expect <pty-output ...> messages and send <pty-input ...> messages to interact with the subprocess.

See the protocol definition for more about interacting with PTYs over Syndicate.