diff options
Diffstat (limited to 'docs/typ/building.typ')
| -rw-r--r-- | docs/typ/building.typ | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/docs/typ/building.typ b/docs/typ/building.typ index 9350b484..8bfcb85b 100644 --- a/docs/typ/building.typ +++ b/docs/typ/building.typ @@ -501,10 +501,13 @@ life; the first session that finds none starts it (a double fork and an exec) and it exits a second after it holds nothing. It is nobody's parent: a session registers on one connection, sends it a dup of every pty master it forks (so a session killed outright never hangs its shells up, and -#word("Adopt") takes them into another), says whether a terminal or a -window shows it, and is handed a terminal (`pardes --attach`) or a window -request (`pardes-gui --attach`) through it. Messages are `SOCK_SEQPACKET` -datagrams: a line of words and the fds it carries. +#word("Adopt") takes them into another), says whether it has let its own +terminal or window go, and is handed each client's connection through it +(`pardes attach`, below). A daemon that dies is started again by the +sessions: each one's link's reader, woken by the link's end, dials the +next, says the hello again and tells it its masters and its clients. +Messages are `SOCK_SEQPACKET` datagrams: a line of words and the fds it +carries. `pardes` in a terminal forks its session off before anything starts: the session, in a session of its own (`setsid`), draws on the terminal it @@ -512,9 +515,9 @@ opened, and the process the shell waits on stays as its stub, passing it `SIGWINCH`, `SIGTERM`, `SIGINT` and `SIGQUIT` and ending with its status. #word("Detach"), or the terminal's end (EIO, a hangup), puts the terminal back and lets it go; the stub ends (exit 0) and the session -runs on with nothing drawn, until `pardes --attach` hands it another -terminal. A window's #word("Detach") closes the window and keeps the -process; `pardes-gui --attach` opens one again. `PARDES_DAEMON=off` (the +runs on with nothing drawn, detached for good: `pardes attach` is a client +of it. A window's #word("Detach") closes the window and keeps the +process, the same. `PARDES_DAEMON=off` (the process tests) runs a session as before the daemon: in the terminal's own process, ended by its hangup. |
