title: How to gently kill Firefox process on Linux/OS X
body: <p>I'm doing some automation with Firefox and although I can open Firefox window from shell, I'm not able to terminate it properly. If I <code>kill</code> Firefox process with <code>kill -3</code> or <code>kill -2</code> command the next time I open a new Firefox window it asks me if I want to run in safe-mode. I understand that calling <code>kill -9</code> could confuse Firefox so it would try to run in safe-mode but <code>-3</code> should be fine.</p>
  
  <p>Do you have any idea how to gently tell Firefox to close properly?</p>