summaryrefslogtreecommitdiff
path: root/runtime/session.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 04:16:02 -0300
committerGabriel Schneider <[email protected]>2026-11-20 04:25:21 -0300
commit2fadb864051f5afc062606a898d821b702a1692c (patch)
tree36a5164d90e991ae30a330d48fe26828332b63dd /runtime/session.zig
parent6e8735895d04c0073eb28cc1a2f431a2ba587e9d (diff)
downloadpardes-2fadb864051f5afc062606a898d821b702a1692c.tar.gz
pardes-2fadb864051f5afc062606a898d821b702a1692c.zip
launch: `pardes new --detach[=NAME]` forks the session off and returns once it is registered and listening (the last-step design's Z1, 2.2 F's second half): exit 0 and the name on stdout, the session in a session of its own (setsid, stdin /dev/null, its stdout and stderr the launch's until it runs, so a failed start still says why there and its status is the launch's), by the stub's own wait with one word more (`r<name>`, daemon.zig `launch`/`launched`, told from the session loop after its frontend's start); the flag alone (`pardes --detach=NAME`, what every harness and a supervisor runs) is still the session itself; test/daemon.py `launch` (plain and `--launch`) failing first on the base (not returned after 15 s: the launch was the session), then 0.12-0.22 s; help new and docs/typ/command-line.txt say so
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'runtime/session.zig')
-rw-r--r--runtime/session.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/session.zig b/runtime/session.zig
index fdd72c2b..6b359eef 100644
--- a/runtime/session.zig
+++ b/runtime/session.zig
@@ -113,6 +113,8 @@ pub fn Loop(comptime Frontend: type) type {
l.ptys.start(l.core);
l.watches.start();
try fe.start(&l);
+ // A `new --detach`'s launch returns now.
+ daemon.launched();
while (!l.core.quit) {
pardes.turn.bump(&pardes.turn.restores);