When I use the find_handles() with process_ids=[os.getppid()] after the close_handles() when I exit from python, it crashes and kills the cmd.exe window too.
Python 3.12.1 (tags/v3.12.1:2305ca5, Dec 7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> from pywinhandle import find_handles, close_handles
>>> handles = find_handles(process_ids=[os.getppid()])
>>> close_handles(handles)
>>> quit()
and the whole Windows Terminal crashes.
After some additional testing, the handle type causes the crash is 'File'
handles = find_handles(process_ids=[os.getppid()], handle_types=['File'])
When I use the
find_handles()withprocess_ids=[os.getppid()]after theclose_handles()when I exit from python, it crashes and kills thecmd.exewindow too.and the whole Windows Terminal crashes.
After some additional testing, the handle type causes the crash is 'File'