diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-29 22:18:34 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-29 23:37:00 -0300 |
| commit | ddcfd860ef05c37f5536038d8828cc81c0c4125c (patch) | |
| tree | 447d95dc0769273f2919747e30f5a24faec3fc21 /docs/typ | |
| parent | 2d86687b98f389232b213dfa67cfa731b0280fbb (diff) | |
| download | pardes-ddcfd860ef05c37f5536038d8828cc81c0c4125c.tar.gz pardes-ddcfd860ef05c37f5536038d8828cc81c0c4125c.zip | |
upgrade: the Upgrade word (SPC s U, a tag, 9P) moves a running session onto the pardes installed where it started, in place, by exec at a step boundary: its dump in the DumpDir, its pty masters, terminals, stubs and daemon link kept open and named on the new command line, every view and running shell its own again; the daemon re-execs too, its registry on its command line; a build that cannot load the dump falls back to the old binary, or starts afresh with the shells adopted and the dump kept (test/daemon.py --upgrade, --upgrade --gui)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/typ')
| -rw-r--r-- | docs/typ/building.typ | 13 | ||||
| -rw-r--r-- | docs/typ/builtins-gui.json | 1 | ||||
| -rw-r--r-- | docs/typ/builtins-tty.json | 1 | ||||
| -rw-r--r-- | docs/typ/guide.typ | 7 |
4 files changed, 21 insertions, 1 deletions
diff --git a/docs/typ/building.typ b/docs/typ/building.typ index e42702c6..d8c089f6 100644 --- a/docs/typ/building.typ +++ b/docs/typ/building.typ @@ -236,6 +236,19 @@ hands an accepted connection to its session (`SCM_RIGHTS`), which welcomes it and from then on is the one it talks to. Today the session answers pings and nothing more. +#word("Upgrade") (`src/upgrade.zig`) execs the path the session was started +from, at a step boundary, after asking it `--version`: the session's dump +goes to the DumpDir (`pardes-upgrade-<pid>.dump`), and its pty masters, +terminals, stubs and daemon link stay open across the exec, named in a +record on the new command line (`--upgraded=`) ahead of the arguments it +was started with. The pid stays, so the shells stay its children; the new +process loads the dump with every view and takes the fds back. One that +cannot load it execs the old binary again (kept open from +`/proc/self/exe`), or with none starts afresh with the shells adopted and +the dump left for a Restore. The daemon re-execs the same way, its +registry on its command line. `python3 -B test/daemon.py --upgrade <old> +<new>` (and `--upgrade --gui`) is the end-to-end test. + = 9P The wire format, the client and server connections, the file-server engine diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json index 9db9e396..e731b75e 100644 --- a/docs/typ/builtins-gui.json +++ b/docs/typ/builtins-gui.json @@ -152,6 +152,7 @@ {"name": "Undo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Undo and Redo: step the pane's body back or forward through its edits, from a tag, a pane ctl or exec."}, {"name": "Unmount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Unmount the 9P tree mounted under /n/<name>."}, {"name": "Up", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane above, and from a column's top pane to its tag."}, + {"name": "Upgrade", "leader": "SPC s U", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Move this session onto the pardes installed since it started, in place: its text, undo, views, terminals with their running shells, and its terminals and windows come along."}, {"name": "Verbose", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A builtin says its own name on the message row as it runs, on or off."}, {"name": "Vignette", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off, 0-3", "doc": "The window's corners fall into shade: a level, 0 (off) through 3."}, {"name": "Window", "leader": "SPC w", "also": ["C-w"], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Window mode: h/j/k/l move an outline between the panes; Enter or Esc focuses the outlined pane, `:` its tag, the letter shown on a pane that one; d is Del on it (then k or j between two), c Collapse."}, diff --git a/docs/typ/builtins-tty.json b/docs/typ/builtins-tty.json index 151c04a6..fe81b3fa 100644 --- a/docs/typ/builtins-tty.json +++ b/docs/typ/builtins-tty.json @@ -135,6 +135,7 @@ {"name": "Undo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Undo and Redo: step the pane's body back or forward through its edits, from a tag, a pane ctl or exec."}, {"name": "Unmount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Unmount the 9P tree mounted under /n/<name>."}, {"name": "Up", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane above, and from a column's top pane to its tag."}, + {"name": "Upgrade", "leader": "SPC s U", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Move this session onto the pardes installed since it started, in place: its text, undo, views, terminals with their running shells, and its terminals and windows come along."}, {"name": "Verbose", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A builtin says its own name on the message row as it runs, on or off."}, {"name": "Window", "leader": "SPC w", "also": ["C-w"], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Window mode: h/j/k/l move an outline between the panes; Enter or Esc focuses the outlined pane, `:` its tag, the letter shown on a pane that one; d is Del on it (then k or j between two), c Collapse."}, {"name": "Wrap", "leader": "SPC t w", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Long lines wrap onto the next row, on or off."}, diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ index 0b721658..4430276f 100644 --- a/docs/typ/guide.typ +++ b/docs/typ/guide.typ @@ -358,7 +358,12 @@ one lets only that one go. A session is named by `--9p=` or `--detach=`, else its pid. A session killed outright leaves its shells running; #word("Adopt") in another takes them in as terminal panes, what they showed gone. One `pardes --daemon` per user keeps all of it, and -leaves once nothing is kept. +leaves once nothing is kept. After a rebuild, #word("Upgrade") +(#key("SPC s U")) moves a running session onto the pardes now installed +where it was started from, in place: its text and undo, its views, its +terminals with their running shells, and its terminals and windows come +along, and the daemon moves too. A build that cannot read the session +hands it back to the one that ran it. = Config <config> |
