maralorn / nix-output-monitor

Pipe your nix-build output through the nix-output-monitor a.k.a nom to get additional information while building.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gracefully exit when confronted with different error conditions.

maralorn opened this issue · comments

SIGINT seems to be fine but SIGTERM does not work.

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: Mic92/nix-fast-build@8c84a91#diff-9d885e639e896c471d700b09b2d5cddc505f12f7fea6f369bce4c392b0655805R404