Skip to main content

Module program_resume

Module program_resume 

Source
Expand description

Program Resume Protocol (OSC 7577) encoding. No terminal I/O.

A program that knows how to resume itself reports its resume command to the terminal; the terminal may run it after a restart. Reports are a hint, never a guarantee. See https://www.superlogical.com/rex/docs/build/program-resume.

Enums§

ProgramResumeUpdate
Projection commands for the session-owned resume adapter.

Constants§

MAX_ARGV_ELEMENTS
Maximum argv elements we emit; terminals must accept at least this many.
MAX_REPORT_LEN
Maximum report length we emit; terminals must accept at least this much.
OSC_PROGRAM_RESUME
OSC number for the Program Resume Protocol.
RESUME_TOKEN_ENV
Environment variable carrying the per-terminal resume token.

Functions§

current_pid
Current process id for the pid key.
current_unix_time
Current Unix time in seconds for the time key.
encode_clear
Encode a record removal for pid made at time.
encode_report
Encode a resume report for pid made at time.
resume_token
Read the resume token from the process environment.
validate_target
Validate a resume target without encoding it.