Commit 1d834eb3 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

pass command-line options as separate literals

parent f20d15b0
......@@ -682,18 +682,17 @@ class WebSocketProtocol(WebSocket):
def launch_server(callback, debug):
"""Launch the server in a separate process"""
LOG.info('Start SessionHelper session')
opts = ["start", "daemon"]
if debug:
opts.append('-d')
if utils.iswin():
command = [] if ISFROZEN else ["pythonw.exe"]
command.append(callback)
if debug:
command.append('-d')
command.append("start daemon")
command += opts
subprocess.Popen(command, close_fds=True)
else:
pid = os.fork()
if not pid:
command = [callback, callback]
if debug:
command.append('-d')
command.append("start daemon")
command += opts
os.execlp(*command)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment