mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-10-26 14:30:13 +00:00
1d20ae56c8
#1980's script started the server through clean(), a shell FUNCTION, in the background. That runs in a subshell, so $! was the subshell's pid: the startup liveness check, the SIGTERM and the 'did not stop within 5s' assertion were all aimed at the subshell, and the real server kept running. The stop check could never fail, and every run left a server behind (found as seven stray pad servers, two under qemu, from the snapshot verification, while chasing a low-memory reap). The server now starts through env directly, so $! IS the server, and 'stopped' also means nothing answers on the port afterwards. Measured against a real binary: the old script passes and leaves 1 server running; this one passes and leaves 0.