You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Closing the terminal of a gemdb run leaves topaz running the program #136
What happens. Sending SIGHUP to the process group of gemdb forever.py, as closing a terminal tab does, ends the bash wrapper but not topaz. Topaz keeps running the program and keeps its session logged in. Measured on both main (topaz -S) and #132 (topaz -P) with 4.0.0.a4, using a program that loops and sleeps. stopstone then refuses with "Other users logged in". SIGTERM does end topaz.
Why it matters.gemdb web/app.py is the shape that hits this. A server that has stopped printing has nothing to fail on when the terminal disappears, so it keeps the port and one of the ten sessions until someone finds the process. On a real terminal, the next write to the closed tty probably ends the run (EIO). That hasn't been measured, and it doesn't help a program that never prints.
Not measured yet.
Whether topaz ignores SIGHUP or handles it (soft break, then carries on?).
What a real terminal-tab close in VS Code does, as opposed to kill -HUP -<pgid> from a test.
Possible direction. The wrapper already has an EXIT trap (#132). A trap … HUP there could pass the hangup on as SIGTERM to topaz. The cost is that it's a hard stop: finally blocks wouldn't run, which may be acceptable when nobody is left to see them. The integration test added in #132 (leaves no temporary files behind, even when its terminal closes mid-run) currently ends topaz itself. A fix would remove that step and assert that the session is gone.
Activity