16ce073d0c
_cleanup_children() called os.killpg unconditionally — Windows doesn't have killpg as an attribute on os, so the call raised AttributeError (not caught by the existing OSError-family handler) and aborted cleanup. Guard with hasattr(os, "killpg") and fall back to os.kill(pid, SIGTERM) on platforms without process-group APIs. Closes #226. Refs #110. Co-authored-by: gujishh <baiaoshh@163.com>