summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ptxdist11
-rw-r--r--scripts/libptxdist.sh2
2 files changed, 12 insertions, 1 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 674ed1d3a..e8a33db9b 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -836,6 +836,9 @@ Options:
--load-average=<n>, -l<n> try to limit load to <n>
+ --nice=<n>, -n<n> run with reduced scheduling priority (i.e. nice)
+ (default = 10)
+
-k keep going. Continue as much as possible
after an error.
@@ -1299,6 +1302,14 @@ parse_first()
--load-average=*)
PTXDIST_LOADMFLAGS_INTERN="-l${arg#*=}"
;;
+ -n*)
+ PTX_NICE="${arg#*n}"
+ PTX_NICE="${PTX_NICE:-10}"
+ ;;
+ --nice=*)
+ PTX_NICE="${arg#*=}"
+ PTX_NICE="${PTX_NICE:-10}"
+ ;;
-q|--quiet)
PTXDIST_QUIET=1
;;
diff --git a/scripts/libptxdist.sh b/scripts/libptxdist.sh
index 8e12f8f55..6af6aaaa3 100644
--- a/scripts/libptxdist.sh
+++ b/scripts/libptxdist.sh
@@ -344,7 +344,7 @@ ptxd_make() {
for lib in "${SCRIPTSDIR}/lib/ptxd_make_"*.sh; do
source "${lib}" || ptxd_bailout "failed to source lib: ${lib}"
done
- "${PTXCONF_SETUP_HOST_MAKE}" \
+ ${PTX_NICE:+nice -n ${PTX_NICE}} "${PTXCONF_SETUP_HOST_MAKE}" \
"${PTX_MAKE_ARGS[@]}" "${PTXDIST_PARALLELMFLAGS_EXTERN}" \
-f "${RULESDIR}/other/Toplevel.make" "${@}" || return
}