Reworked interactive mode, on the way to fixing #803.
This commit is contained in:
parent
a9480f9f64
commit
f1834dc194
2 changed files with 10 additions and 2 deletions
|
|
@ -1034,8 +1034,13 @@ def server_operation(mode, service, interactive, profiler):
|
|||
PORTAL_LOGFILE, HTTP_LOGFILE])
|
||||
# start the server
|
||||
process = Popen(cmdstr, env=getenv())
|
||||
|
||||
if interactive:
|
||||
process.wait()
|
||||
try:
|
||||
process.wait()
|
||||
except KeyboardInterrupt:
|
||||
print "\nKeyboard interrupt sent in interactive mode.\n"
|
||||
|
||||
|
||||
elif mode == 'reload':
|
||||
# restarting services
|
||||
|
|
|
|||
|
|
@ -184,7 +184,10 @@ def start_services(server_argv, portal_argv):
|
|||
while True:
|
||||
|
||||
# this blocks until something is actually returned.
|
||||
message, rc = processes.get()
|
||||
try:
|
||||
message, rc = processes.get()
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
|
||||
# restart only if process stopped cleanly
|
||||
if (message == "server_stopped" and int(rc) == 0 and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue