From 1a6006b457a68e6db51315a83a97ec0d9eb631d4 Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Wed, 9 Aug 2017 20:12:20 +0530 Subject: Fix order of run as nobody. It should be run before ServerPool is created so the shared dictionary works correctly. --- yaksh/code_server.py | 6 +++--- 1 file 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() -- cgit