How to restart a webapp?

How to restart the application with code?

What OS are you hosting on?

ubuntu, webapp cgi with apache2

The app should start on the next connection attempt I believe. I work on Windows so just an asumption.

Deployed to the server to testing, app.quit, chrome or safari will automatically reconnect.