Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window crash with handle_types 'File' #6

Open
rtommy opened this issue Nov 1, 2024 · 0 comments
Open

Window crash with handle_types 'File' #6

rtommy opened this issue Nov 1, 2024 · 0 comments

Comments

@rtommy
Copy link

rtommy commented Nov 1, 2024

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'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant