I have a simple socketServer
that works perfectly on the main thread.
#Server PORT
PORT = 8020
#reassign variables
Handler = Server #this is a SimpleHTTPHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)
httpd.serve_forever()
I need to have this run in the background and have the ability to stop the process at will. What is the proper way to do this?
EDIT
Sorry I was unclear. I need to have the server running non stop and I can only access the system from SSH so I can't just start it and walk away.