Commit 24deda5a authored by Helmut Grohne's avatar Helmut Grohne

invoke setsid for each job

This should cause each jenkins job to reside in its own session. Linux'
automatic group scheduling should then cause jobs to be scheduled
equally rather than processes. The expected result is that highly
parallel jobs do not slow down single-cpu jobs.
parent ee7dc16e
......@@ -24,7 +24,7 @@ if [ "${0:0:5}" != "/tmp/" ] ; then
# this hack makes it possible to overwrite long running scripts
# anytime...)
echo "$(date) - start running \"$0\" as \"$TTT\" using \"$@\" as arguments."
$TTT "$@"
/srv/jenkins/bin/ $TTT "$@"
exit $?
# cleanup is done automatically via trap
"""backport of util-linux' setsid -w to Debian stable"""
import os
import sys
if __name__ == "__main__":
assert len(sys.argv) > 1
pid = os.fork()
if pid == 0:
os.execvp(sys.argv[1], sys.argv[1:])
cpid, status = os.wait()
assert cpid == pid
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