Kill spawned `docker events` on exit
Description
docuum spawns docker events process, but doesn’t kill it on exit, i.e. it’s left as an orphaned process.
Instructions to reproduce the bug
Start docuum, then exit with SIGTERM.
Environment information:
- Docuum version: 0.21.1
- Docker version: 20.10.18
- OS: Alpine Linux
Thanks for filing this bug!
Looking at the code, it seems we're using a scopeguard to kill the child process via RAII here:
https://github.com/stepchowfun/docuum/blob/1ecec34bd812abdddddd31a15d608217c209ca64/src/run.rs#L764-L767
But Docuum doesn't install a handler for SIGTERM, so the main loop never exits cleanly and the scopeguard is never dropped.
I would gladly review a PR to fix this. Otherwise, I will look into it when I have a spare moment (somewhat rare these days).
This should be fixed in v0.24.0.