docuum icon indicating copy to clipboard operation
docuum copied to clipboard

Kill spawned `docker events` on exit

Open jirutka opened this issue 3 years ago • 1 comments

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

jirutka avatar Sep 21 '22 15:09 jirutka

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).

stepchowfun avatar Sep 21 '22 20:09 stepchowfun

This should be fixed in v0.24.0.

stepchowfun avatar Apr 05 '24 09:04 stepchowfun