Skip to content

fix(devloop): spawn the dev-loop daemon in a session of its own - #25516

Merged
mshabarov merged 1 commit into
mainfrom
fix/spawn-daemon-in-own-session
Sep 7, 2026
Merged

mshabarov merged 1 commit into
mainfrom
fix/spawn-daemon-in-own-session

Conversation

@tltv

@tltv tltv commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

A nohup'd daemon stays in the process group of the command that spawned it, and the runners vaadin-dev is driven from - agent sandboxes, CI steps, timeout --kill-after - end a command by killing that group. The daemon and the application it owned died with the very command that started them, so every later command found a stale handshake, spawned a fresh daemon and reported the app as stopped: the loop never held across two commands.

setsid, or perl's POSIX::setsid where no setsid binary ships, puts it out of reach of that kill. A handshake left behind by a dead pid is now reported instead of quietly reaped, since a daemon that shuts down deletes its own.

A nohup'd daemon stays in the process group of the command that spawned it,
and the runners vaadin-dev is driven from - agent sandboxes, CI steps,
timeout --kill-after - end a command by killing that group. The daemon and
the application it owned died with the very command that started them, so
every later command found a stale handshake, spawned a fresh daemon and
reported the app as stopped: the loop never held across two commands.

setsid, or perl's POSIX::setsid where no setsid binary ships, puts it out of
reach of that kill. A handshake left behind by a dead pid is now reported
instead of quietly reaped, since a daemon that shuts down deletes its own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tltv tltv changed the title fix: spawn the dev-loop daemon in a session of its own fix(devloop): spawn the dev-loop daemon in a session of its own Sep 7, 2026
@github-actions github-actions Bot added the +0.0.1 label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Test Results

 1 435 files  +1   1 519 suites  +1   1h 33m 37s ⏱️ + 2m 28s
11 883 tests  - 8  11 815 ✅  - 8  68 💤 ±0  0 ❌ ±0 
12 201 runs   - 8  12 133 ✅  - 8  68 💤 ±0  0 ❌ ±0 

Results for commit 110bc47. ± Comparison against base commit 8d2721d.

@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

@mshabarov
mshabarov added this pull request to the merge queue Sep 7, 2026
Merged via the queue into main with commit 8788116 Sep 7, 2026
42 checks passed
@mshabarov
mshabarov deleted the fix/spawn-daemon-in-own-session branch September 7, 2026 11:54
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.3.0-beta2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants