added TODO comment for scripts that don't return

(Boeing r1790)
This commit is contained in:
ahrenholz 2013-10-28 21:42:32 +00:00
parent ed401451d2
commit d9b564acb4

View file

@ -876,6 +876,10 @@ class CoreRequestHandler(SocketServer.BaseRequestHandler):
old_session_ids = set(server.getsessionids()) old_session_ids = set(server.getsessionids())
sys.argv = shlex.split(ex) sys.argv = shlex.split(ex)
scriptname = sys.argv[0] scriptname = sys.argv[0]
# TODO: Script may not return; run in separate thread here.
# Wait for some configurable timeout period, then check
# for new session below. Wait for session to enter
# the runtime state, then send back the register message.
execfile(scriptname, {'server': server}) execfile(scriptname, {'server': server})
if msg.flags & coreapi.CORE_API_STR_FLAG: if msg.flags & coreapi.CORE_API_STR_FLAG:
new_session_ids = set(server.getsessionids()) new_session_ids = set(server.getsessionids())