Description
persistent_local_browser.py has two Windows incompatibilities that prevent the tool from working on Windows:
-
signal.SIGTERM not available on Windows (line 187): os.kill(pid, signal.SIGTERM) raises AttributeError because signal.SIGTERM is a Unix-only constant. The release command crashes.
-
start_new_session is POSIX-only (line 141-142): The process detach logic only applies on POSIX. On Windows, the Chromium subprocess is not detached from the parent, so it gets killed when the parent exits - making the "persistent" browser feature non-functional.
Impact
- The entire
persistent_local_browser tool is broken on Windows
_cmd_release crashes with AttributeError when trying to terminate a browser
- Persistent browser sessions cannot outlive the creating script on Windows
- Error message is a cryptic Python traceback, not a helpful diagnostic
Suggested Fix
Add Windows code paths:
- For process detach: use
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP on Windows
- For termination: use
taskkill /F /T /PID on Windows as an alternative to os.kill(pid, signal.SIGTERM)
Description
persistent_local_browser.pyhas two Windows incompatibilities that prevent the tool from working on Windows:signal.SIGTERMnot available on Windows (line 187):os.kill(pid, signal.SIGTERM)raisesAttributeErrorbecausesignal.SIGTERMis a Unix-only constant. Thereleasecommand crashes.start_new_sessionis POSIX-only (line 141-142): The process detach logic only applies on POSIX. On Windows, the Chromium subprocess is not detached from the parent, so it gets killed when the parent exits - making the "persistent" browser feature non-functional.Impact
persistent_local_browsertool is broken on Windows_cmd_releasecrashes withAttributeErrorwhen trying to terminate a browserSuggested Fix
Add Windows code paths:
creationflags=subprocess.CREATE_NEW_PROCESS_GROUPon Windowstaskkill /F /T /PIDon Windows as an alternative toos.kill(pid, signal.SIGTERM)