Browse files

phpsh renice itself on startup

phpsh deals with forking processes and polling IO handles. Renicing
should keep rare concurrency bugs from exploding the dev servers.
  • Loading branch information...
1 parent 4baee25 commit 00c4de30e69c56be869a6371cf6d6ca6b272c619 Yiding Jia committed with adonohue Jul 16, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/phpsh
@@ -23,6 +23,7 @@ p.add_option("-A", "--no-autocomplete", action="store_true")
p.add_option("-C", "--no-color", action="store_true")
p.add_option("-M", "--no-multiline", action="store_true")
p.add_option("-T", "--no-ctags", action="store_true")
+p.add_option("-N", "--no-nice", action="store_true")
p.add_option("-X", "--xdebug", action="store_true",
help="Enable PHP debugging with xdebug (this also disable" +
@@ -33,6 +34,9 @@ p.add_option("-X", "--xdebug", action="store_true",
if not opts.codebase_mode:
opts.codebase_mode = ""
+if not opts.no_nice:
+ os.nice(10)
do_multiline = not opts.no_multiline
s = PhpshState(cmd_incs=set(cmd_incs),

0 comments on commit 00c4de3

Please sign in to comment.