Commit c6b82798 authored by Jim Fulton's avatar Jim Fulton

Added logic to pass the -O option to the child process when -O

was used to start the process. This allows zdaemon-controlled
processes to take advantage of optimization.
parent c2dc8222
......@@ -225,8 +225,12 @@ def run(argv, pidfile=''):
else:
# Child
os.execv(pyth, (pyth,)+tuple(argv))
if __debug__:
# non optimized
os.execv(pyth, (pyth,) + tuple(argv))
else:
# optimized
os.execv(pyth, (pyth, '-O') + tuple(argv))
except ExecError:
sys.exit()
......@@ -250,12 +254,4 @@ def main():
run(argv, pidf)
if __name__ == '__main__': main()
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