Closed djdookie closed 3 years ago
Thanks for the feedback. I'll pick up this one!
I have a branch ready that implements communicate()
, however I wasn't able to reproduce the errors on my systems. Could you have a look and see if this fixes the issue on your end @djdookie ? (see above for PR)
Works like a charm. No zombie processes anymore on your branch #195. Thanks for implementing this fix so quickly!
Hi, I just noticed a git zombie process started by chiadog.
This is from my processlist in Ubuntu userx 19328 3325 0 14:47 pts/1 00:00:00 /bin/bash userx 19329 19328 1 14:47 pts/1 00:00:00 python3 main.py --config config.yaml userx 19330 19329 0 14:47 pts/1 00:00:00 [git] \
Having a look into main.py tells me the reason should be this part in version():
I guess the git subprocess won't die since the stderr is never consumed.
See here: https://www.reddit.com/r/learnpython/comments/3lzv4r/subprocess_becomes_zombie_why/ https://stackoverflow.com/questions/2760652/how-to-kill-or-avoid-zombie-processes-with-subprocess-module/2761237#2761237 "Not using Popen.communicate() or call() will result in a zombie process."
It's not a big deal since this only happens once at start, but I'd prefer to not have any permanent zombie processes. Finally, this should be a very easy and quick fix!