Skip to content

Window crash with handle_types 'File' #6

@rtommy

Description

@rtommy

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'])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions