browsh-org / browsh

A fully-modern text-based browser, rendering to TTY and browsers
https://www.brow.sh
GNU Lesser General Public License v2.1
17.06k stars 417 forks source link

Kill the headless Firefox process by PID, not by grepping `ps` #61

Open tombh opened 6 years ago

tombh commented 6 years ago

This was first brought up by a user that had an existing Selenium session: #59

If Browsh's Firefox process can have an identifying mark to it, then we can detect that instead of a crude detection of any headless Firefox process.

tombh commented 6 years ago

Uh, as @olleharstedt pointed out, save the PID!

martin-braun commented 9 months ago

Sometimes the instance is lost, but still running. I also think a use-existing = auto could help here. Start a new instance, but if it's running, try to attach to it instead. Right now you have to do either-or.