Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2015-04-17 20:11:53 +0300
committerBryan Drewery <bryan@shatow.net>2015-04-17 20:12:04 +0300
commitd4b784955da716797c340985831cf85a3d3d222d (patch)
tree60740b717d013359922d13c4f4eb8469628ba10f /src/bin/poudriere
parentceea4ad98a8b3e7fb408b0759960cfd8eee8935e (diff)
Always protect(1) poudriere and its coprocesses from OOM killer.
parallel_run processes are excluded mostly due to the overhead of protecting them. Those generally only are used pre-build so are not likely to hit OOM. The reasoning for this is so Poudriere can do all needed cleanup of its jails and mounts. Port builds are _not_ protected. Only Poudriere's control scripts.
Diffstat (limited to 'src/bin/poudriere')
-rwxr-xr-xsrc/bin/poudriere5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/poudriere b/src/bin/poudriere
index 95bdce47..a2ec1f9b 100755
--- a/src/bin/poudriere
+++ b/src/bin/poudriere
@@ -121,4 +121,7 @@ case "${CMD}" in
;;
esac
-exec env -i ${CMD_ENV} /bin/sh ${SETX} "${POUDRIEREPREFIX}/${CMD}.sh" "$@"
+[ -f /usr/bin/protect ] && [ $(/usr/bin/id -u) -eq 0 ] &&
+ PROTECT=/usr/bin/protect
+exec env -i ${CMD_ENV} ${PROTECT} /bin/sh ${SETX} \
+ "${POUDRIEREPREFIX}/${CMD}.sh" "$@"