Closed maralorn closed 1 year ago
Actually I tested. Stopping with SIGINT also causes the cursor not to be restored here.
In https://github.com/Mic92/nix-ci-build I do something like: (nix-build ...; nix-build ...) >&2 | nom
and than send a normal SIGTERM or SIGINT. Looks like https://code.maralorn.de/maralorn/nix-output-monitor/src/commit/6ca91b73f9e51b4486b3542c23d496f470026e2b/exe/Main.hs#L128 doesn't cover any of these case. Next I will try to just close the pipe and wait for nom to terminate.
Turns out it doesn't handle any signal and closing the pipe followed by waiting for nom to exit, fixes it: https://github.com/Mic92/nix-ci-build/commit/8c84a91e40d5e9e34d698d1c6127395c25bbc209#diff-9d885e639e896c471d700b09b2d5cddc505f12f7fea6f369bce4c392b0655805R404
SIGINT seems to be fine but SIGTERM does not work.