Executing start-stop-daemon with --nicelevel option won't work. example: (code from http://www.gentoo.org/doc/en/rsync.xml) start-stop-daemon --start --quiet --pidfile /var/run/rsyncd.pid --nicelevel 15 --exec /usr/bin/rsync -- ${RSYNCOPTS} result: start-stop-daemon: Unable to alter nice level by 15: Success [ !! ] start-stop-daemon.c (sys-apps/baselayout) doesn't use nice(2) correctly. According to libc.info, its return value is the new nicelevel on success, and -1 on failure. man 2 nice says that nice return 0 on success, that's not true.
which version of baselayout ?
Sorry for missing information: $ qpkg -v -f /sbin/start-stop-daemon sys-apps/baselayout-1.8.5.8 * (rc-scripts-1.4.2.8.tar.bz2) thanks in advance,
Hi, Here is a fix for this bug. This works for me. http://cvs.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-src/rc-scripts/sbin/start-stop-daemon.c --- start-stop-daemon.c 2001-12-09 07:19:04.000000000 +0900 +++ start-stop-daemon.c 2003-01-24 17:01:49.000000000 +0900 @@ -945,7 +945,7 @@ dup(fd); /* stderr */ } if (nicelevel) { - if (nice(nicelevel)) + if (nice(nicelevel)==-1 && errno) fatal("Unable to alter nice level by %i: %s", nicelevel, strerror(errno)); }
Looks good. Fixed on CVS, thanks.
*** Bug 16467 has been marked as a duplicate of this bug. ***