ports/108465: [patch] databases/memcached: allow to run with negative priority (niceness)
Anton Yuzhaninov
citrin at rambler-co.ru
Sun Jan 28 08:00:36 UTC 2007
>Number: 108465
>Category: ports
>Synopsis: [patch] databases/memcached: allow to run with negative priority (niceness)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 28 08:00:35 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Anton Yuzhaninov
>Release: FreeBSD 6.1-RELEASE-p1 i386
>Organization:
Rambler
>Environment:
System: FreeBSD mcgi18.rambler.ru 6.1-RELEASE-p1 FreeBSD 6.1-RELEASE-p1 #0: Fri Jun 9 17:23:22 MSD 2006 citrin at mcgi18.rambler.ru:/usr/obj/usr/src/sys/MCGI i386
Port: memcached-1.2.0_2
>Description:
rc.d script uses var memcached_user to set -u option for memcached, but *_user variables
has special meaning in rc.subr - if $name_user is set, command
run via su(1).
It not need for memcached, because it has -u option, and this don't
allow to increase process priority.
In 6.2 nice run before su, and it possible to increase priority:
http://lists.freebsd.org/pipermail/cvs-all/2006-August/185240.html
but anyway su(1) don't need for memcached.
>How-To-Repeat:
Add to /etc/rc.conf
memcached_enable="YES"
memcached_nice="-10"
# /usr/local/etc/rc.d/memcached start
Starting memcached.
nice: setpriority: Permission denied
>Fix:
--- files/memcached.in.orig Sun Jan 28 10:11:44 2007
+++ files/memcached.in Sun Jan 28 10:12:12 2007
@@ -28,4 +28,6 @@
command=%%PREFIX%%/bin/memcached
command_args="-d -u ${memcached_user}"
+unset memcached_user
+
run_rc_command "$1"
Another option is rename memcached_user to memcached_username, but it
break POLA.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list