You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
runner: a sandboxed tty: true command terminated during its sandbox setup can keep running (Linux) #119
On Linux, terminating a sandboxed tty: true process, or its timeout, signals the PTY root's process group. bubblewrap's sandbox process, the first process of the sandbox's PID namespace, is in that group until it starts a session of its own, which it does only shortly before it sets its parent-death signal (--die-with-parent). A kill that lands between those two steps leaves that process running without its parent, and with it the command it then starts, which keeps the PTY open until it ends on its own.
This is the tty: true form of #109. #118 fixed the pipe form, whose window was the whole sandbox setup; this window is much narrower, but it is not closed.
#118 ends a sandboxed pipe process by stopping, then killing, every process below its root, which it finds through /proc from the root's process ID. For a PTY process the Runner does not know that ID: the pinned Codex PTY handle (codex-utils-pty's ProcessHandle) keeps it to itself and offers only its own terminate.
Fix direction
Give the Runner the PTY root's process ID, then end a sandboxed tty: true root the way #118 ends a pipe root, with a test that terminates a tty: true process during sandbox setup. Exposing the ID from the Codex PTY means a change to the recorded Codex patch, which needs the owner's approval; finding it without a Codex change is to be checked first.
Scope
The Linux sandbox (bubblewrap) with tty: true only.
Activity