Windows subprocess timeout cleanup still breaks in last30days.py and bird_x.py
Author: LittleChenLiyaCreated Mar 26, 2026Updated Sep 12, 2026
I ran into this on Windows while debugging YouTube access locally.
I had already fixed one subprocess cleanup path in the YouTube code, but while reproducing that issue I noticed there are still other timeout/cleanup paths that use Unix-only logic like os.killpg(os.getpgid(pid), signal.SIGTERM).
I found at least these remaining spots:
scripts/last30days.pyscripts/lib/bird_x.py
So this looks like the same cross-platform bug still exists in a few other subprocess paths.
What I saw
On Windows, subprocess timeout cleanup can still break when these Unix-specific APIs are used directly.
Suggested fix
It probably makes sense to use the same cross-platform cleanup pattern everywhere:
- use
killpg/getpgidonly when available - otherwise fall back to
proc.kill()(or another Windows-safe termination path)
That should make subprocess timeout/cleanup behavior more consistent across platforms.
Source: mvanhorn/last30days-skill