smarnach / pyexiftool

a Python library to communicate with an instance of Phil Harvey's excellent ExifTool command-line application.
Other
270 stars 111 forks source link

ExifTool process continues to run after parent python process tskill is sent on windows. #34

Open apiszcz opened 3 years ago

apiszcz commented 3 years ago

It appears that something is causing pyxexiftool to ignore the kill signal. I would like to be to terminate the process with taskkill or tskill. tskill PID has no effect

sylikc commented 2 years ago

Do you happen to be using this on WINDOWS?

I have the same problem and I tried to fix it on my fork to no avail https://github.com/sylikc/pyexiftool/commit/5a87388a50e7a8f0dbbaef7e46db5fe9c7c8f941 . This is a problem only on Windows... I've further reported this bug to CPython https://bugs.python.org/issue43784 They haven't fixed it yet...

Behavior: Python interpreter hangs on exit as the autokill doesn't work. I actually think spawning a process like taskkill or tskill will hang as well

apiszcz commented 2 years ago

Yes

On Jan 30, 2022, at 2:10 PM, Kevin M @.***> wrote:

 Do you happen to be using this on WINDOWS?

I have the same problem and I tried to fix it on my fork to no avail @.*** . This is a problem only on Windows... I've further reported this bug to CPython https://bugs.python.org/issue43784 They haven't fixed it yet...

Behavior: Python interpreter hangs on exit as the autokill doesn't work. I actually think spawning a process like taskkill or tskill will hang as well

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

sylikc commented 2 years ago

Anyhow it's not fixed. You'd want to manually call et.terminate instead of having it work at del() . I tried a couple ways, and on Windows it's a bug with CPython 3.9+ ... no way around it.