FS#19206 - [deluge] 1.2.3-3 init script not stopping daemon
Attached to Project:
Arch Linux
Opened by Fuzzy (fuzzy) - Thursday, 22 April 2010, 02:18 GMT
Last edited by Ionut Biru (wonder) - Thursday, 22 April 2010, 10:03 GMT
Opened by Fuzzy (fuzzy) - Thursday, 22 April 2010, 02:18 GMT
Last edited by Ionut Biru (wonder) - Thursday, 22 April 2010, 10:03 GMT
|
Details
Description: Changes in deluge 1.2.3-3 init script in
/etc/rc.d/deluged (and possibly deluge-web) have made it
impossible to kill the daemon in some situations. The scipt
searches for deluged pid by doing "pgrep deluged" and
writing the result in a pidfile. That however finds both the
deluged daemon pid (/usr/bin/deluged) and the pid of the
init script itself (/etc/rc.d/deluged). When trying to stop
the daemon sript reads in the pid file and validates if a
process with this pid exists by doing "[[ -d /proc/$PID ]]
|| PID=" which zeros out the PID variable if pidfile
contains more than one number (as there's no such directory
under /proc).
Additional info: * package deluge 1.2.3-3 Steps to reproduce: $ sudo /etc/rc.d/deluged start :: Starting Deluge Daemon [DONE] [fuzzy@kn-arch rc.d]$ sudo /etc/rc.d/deluged stop :: Stopping Deluge Daemon [FAI |
This task depends upon
Steps to reproduce:
$ sudo /etc/rc.d/deluged start
:: Starting Deluge Daemon [DONE]
$ sudo /etc/rc.d/deluged stop
:: Stopping Deluge Daemon [FAIL]
$ cat /var/run/deluged.pid
5304 6149 6159
Possible fixes:
restrict what pgrep finds by adding user and full path conditions: pgrep -u $DELUGE_USER -f "/usr/bin/deluged$"