daemon --fork --user w rc-scripts

Kacper Kornet kornet at camk.edu.pl
Tue Feb 14 04:32:33 CET 2012


On Mon, Feb 13, 2012 at 11:11:33PM +0100, Paweł Gołaszewski wrote:
> Sprawa się wyjaśniła, ale przy okazji wyszło, że trochę za dużo idzie do 
> /dev/null

> [...]
> + /sbin/start-stop-daemon -q --start --nicelevel -7 --pidfile /var/run/lighttpd-angel.pid --make-pidfile --chdir / --background --exec /usr/bin/env -- SHELL=/bin/sh lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf
> /sbin/start-stop-daemon: Unable to alter nice level by -7: Operation not permitted
> [...]

> 1. Ten komunikat nie powinien iść do śmieci. Czy jest coś co 
>    /sbin/start-stop-daemon wyrzuca i co powinniśmy wywalać?

Tylko jakoś nie widzę, gdzie to jest wyrzucane.

> 2. Dlaczego akurat teraz zaczęło to tak działać?? Od zawsze miałem w 
>    konfiguracji vservera ustawione nice na cały vserver 
>    (/etc/vservers/<server>/nice), ale teraz zaczęło to inaczej działać. Do 
>    tej pory nice w vserverze był względny, a teraz wygląda na to, że nie 
>    jest. Kernel był zmieniany kilka tygodni temu...

A czy to nie jest przypadkiem to:

# svn log -r 12453
------------------------------------------------------------------------
r12453 | glen | 2011-12-14 17:15:48 +0000 (Wed, 14 Dec 2011) | 1 line

- ksh did not like doble minus ("+5--10"), needs spaces ("+5 - -10") to
  process correctly
------------------------------------------------------------------------
# svn diff -r 12452:12453
Index: lib/functions
===================================================================
--- lib/functions       (revision 12452)
+++ lib/functions       (revision 12453)
@@ -643,7 +643,7 @@
                nice=${nice:-0}

                # make nice level absolute, not to be dependant of nice
                # level of shell where service started
-               nice=$((nice-$(nice)))
+               nice=$(($nice - $(nice)))

                if [ "$closefds" = 1 ]; then
                        exec 1>&-

I pytanie czy poprzednio to działało tak jak się spodziewałeś, że to
działa.
-- 
  Kacper Kornet


More information about the pld-devel-pl mailing list