Skip to content

Un-graceful termination on Windows #344

@abel1502

Description

@abel1502

With Python 3.14 on Windows, hitting Ctrl+C causes immediate termination (regardless of --graceful-timeout with the following traceback:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "[redacted]\.venv\Scripts\hypercorn.exe\__main__.py", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "[redacted]\.venv\Lib\site-packages\hypercorn\__main__.py", line 312, in main
    return run(config)
  File "[redacted]\Lib\site-packages\hypercorn\run.py", line 96, in run
    wait(process.sentinel for process in processes)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[redacted]\AppData\Local\Python\pythoncore-3.14-64\Lib\multiprocessing\connection.py", line 1113, in wait
    ready_handles = _exhaustive_wait(waithandle_to_obj.keys(), timeout)
  File "[redacted]\AppData\Local\Python\pythoncore-3.14-64\Lib\multiprocessing\connection.py", line 1045, in _exhaustive_wait
    res = _winapi.WaitForMultipleObjects(short_L, False, timeout)
InterruptedError: [Errno 4] Interrupted function call

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