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/building.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/building.typ')
| -rw-r--r-- | docs/typ/building.typ | 13 |
1 files changed, 13 insertions, 0 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 |
