SVN: rc-scripts/trunk/lib/functions

glen glen at pld-linux.org
Mon Dec 12 11:38:51 CET 2011


Author: glen
Date: Mon Dec 12 11:38:51 2011
New Revision: 12447

Modified:
   rc-scripts/trunk/lib/functions
Log:
daemon(): make nice level absolute, not to be dependant of nice level of shell
where service started.


Modified: rc-scripts/trunk/lib/functions
==============================================================================
--- rc-scripts/trunk/lib/functions	(original)
+++ rc-scripts/trunk/lib/functions	Mon Dec 12 11:38:51 2011
@@ -638,9 +638,13 @@
 	if errors=$(
 		umask ${SERVICE_UMASK:-$DEFAULT_SERVICE_UMASK};
 		export USER=root HOME=/tmp TMPDIR=/tmp
+
 		nice=${nice:-$DEFAULT_SERVICE_RUN_NICE_LEVEL}
 		nice=${nice:-0}
 
+		# make nice level absolute, not to be dependant of nice level of shell where service started
+		nice=$((nice-$(nice)))
+
 		if [ "$closefds" = 1 ]; then
 			exec 1>&-
 			exec 2>&-


More information about the pld-cvs-commit mailing list