Implement wall clock time limits for shell commands
authorTim Starling <tstarling@wikimedia.org>
Sun, 13 Jan 2013 22:48:03 +0000 (09:48 +1100)
committerTim Starling <tstarling@wikimedia.org>
Sun, 13 Jan 2013 22:53:59 +0000 (09:53 +1100)
commitc8e3fa04dbd8f0f185cfab138379a73d2a1227b5
treefaa0245db309303f9ccbf183cfbf3b70ba8d7ee2
parent2926574d7ff86fe03eb3e038790eb6f23d13e142
Implement wall clock time limits for shell commands

* Use the "timeout" command to implement wall clock time limits.
* Write a message to stderr when the time limit is exceeded, for
consistency with ulimit
* Configure with $wgMaxShellWallClockTime
* If "time" is specified in $limits, use that as the wall clock limit in
preference to the global variable, to support legacy callers which
usually want to disable the limits.
* Remove the requirement for ulimit5.sh to be executable since this is
not necessary when you specify the interpreter. Should avoid subtle
problems when the executable bit is accidentally stripped.
* Move the interpretation of 0/-1/false limits to the shell script, so
that e.g. wall clock time can be limited even if memory is unlimited.

Change-Id: Id9f2fea7c3b027565bdc33b88a1a7d4cdfe43a6c
RELEASE-NOTES-1.21
bin/ulimit4.sh [deleted file]
bin/ulimit5.sh [new file with mode: 0644]
includes/DefaultSettings.php
includes/GlobalFunctions.php