algoo / preview-generator

generates previews of files with cache management
https://pypi.org/project/preview-generator/
MIT License
226 stars 50 forks source link

Properly kill Libreoffice process at the end of the timeout. #231

Closed inkhey closed 3 years ago

inkhey commented 3 years ago

As found here https://github.com/tracim/tracim/issues/4552#issuecomment-852207566, there is some trouble with the way we do kill the libreoffice process, as some of his children or grandchildren stay alive despite the signal.

To make thing go work correctly we do need to first SIGTERM and then SIGKILL on process group (all the libreoffice process subtree) instead of process only.

an article about this behaviour: http://morningcoffee.io/killing-a-process-and-all-of-its-descendants.html