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>&-
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to