summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhu Ramachandran2017-08-09 20:12:20 +0530
committerPrabhu Ramachandran2017-08-09 20:12:20 +0530
commit1a6006b457a68e6db51315a83a97ec0d9eb631d4 (patch)
treeadd5db7c9c397985c58353d825888c40a2c47c6e
parentaf06b0d65c1b3ae1f04be1d18c155677e7bf7922 (diff)
downloadonline_test-1a6006b457a68e6db51315a83a97ec0d9eb631d4.tar.gz
online_test-1a6006b457a68e6db51315a83a97ec0d9eb631d4.tar.bz2
online_test-1a6006b457a68e6db51315a83a97ec0d9eb631d4.zip
Fix order of run as nobody.
It should be run before ServerPool is created so the shared dictionary works correctly.
-rw-r--r--yaksh/code_server.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/code_server.py b/yaksh/code_server.py
index 6acce74..7bacc7f 100644
--- a/yaksh/code_server.py
+++ b/yaksh/code_server.py
@@ -232,10 +232,10 @@ def main(args=None):
options = parser.parse_args(args)
- server_pool = ServerPool(n=options.n, pool_port=options.port)
- # This is done *after* the server pool is created because when the tornado
- # app calls listen(), it cannot be nobody.
+ # Called before serverpool is created so that the multiprocessing
+ # can work properly.
run_as_nobody()
+ server_pool = ServerPool(n=options.n, pool_port=options.port)
server_pool.run()