Expand description
The steps of handle_pty_shell_create, one function each, in the order the handler runs them:
where the shell runs, the SSH consent, the reuse of the pane’s existing shell, the new shell’s
block, the atomic claim of the pane’s one shell pointer, the controller start and its rollback.
Moved out of the handler without a change in behaviour. A child module of http_pty_shell.rs.
Functions§
- add_
ssh_ 🔒and_ cwd_ meta - The SSH agent’s identity and the working directory, onto the new shell’s meta.
- attach_
to_ 🔒pointed_ shell - The pane’s existing shell, if its pointer still resolves to one that can be handed out.
- broadcast_
agent_ 🔒block_ update - Tell subscribed frontends the agent’s block changed (its shell pointer or its sub-blocks).
- claim_
shell_ 🔒block - Insert the new shell block and point the agent’s block at it, unless another call got there first,
in which case that call’s shell is attached to instead (
Errcarries the response to return). - create_
pty_ 🔒shell POST /api/v1/ptyshell/create, step by step.Errcarries a response that ends the call early: a refusal, or the attachment to the pane’s existing shell.- initial_
geometry 🔒 - The caller’s initial PTY geometry, if it gave one, as runtime options and as the JSON the resync takes.
- insert_
after_ 🔒lost_ claim - The winner’s shell is gone or had exited: create ours for real, as the won-claim path would have.
- resolve_
connection 🔒 - Where the shell runs and its connection name, or the refusal. A refused connection fails the call with its reason rather than opening a local shell.
- roll_
back_ 🔒failed_ spawn - A failed spawn leaves nothing behind: the block, its link in the agent’s block and the pointer go.
- shell_
block_ 🔒meta - The new shell block’s meta: the headless
termshape, the agent’s env guards, the automatic shell, and the connection. - ssh_
gate 🔒 - The agent that consents for an SSH shell (empty for any other connection), after the checks that come before anything is asked.
- start_
shell_ 🔒controller - Start the shell’s controller; the PTY is live when this returns.
Type Aliases§
- Early 🔒