title: How to get Intellij-idea close Flask dev server properly?
body: <p>I use IDEA 10.5 for my Flask experimentation. Flask has en embedded test server (like Django does)</p>
  
  <p>When I launch my test class, the dev server launches as well on port 5000. All good.
      * Running on <a href="http://127.0.0.1:5000/" rel="nofollow">http://127.0.0.1:5000/</a></p>
  
  <p>When I click on the "Stop process" button (red square), I get the message saying the process is finished :
      Process finished with exit code 143</p>
  
  <p>However the server is still alive (responds to requests) and I can see I still have a python process running.</p>
  
  <p>Obviously this prevents me from relaunching the test straight away, I have to kill the server process first.</p>
  
  <p>How do you manage to get both your program and the server ending at the same time ?</p>