Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#19241 - [deluge] stopping deluge-web daemon doesn't work

Attached to Project: Arch Linux
Opened by Jonathan Liu (net147) - Sunday, 25 April 2010, 08:32 GMT
Last edited by Ionut Biru (wonder) - Saturday, 01 May 2010, 15:28 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ionut Biru (wonder)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Stopping the deluge-web daemon after starting it doesn't work.
Checking /var/run/deluge-web.pid shows that the saved daemon PID is different from the running PID.

Additional info:
* deluge 1.2.3-4

Steps to reproduce:
* /etc/rc.d/deluged start
* /etc/rc.d/deluge-web start
* /etc/rc.d/deluge-web stop
This task depends upon

Closed by  Ionut Biru (wonder)
Saturday, 01 May 2010, 15:28 GMT
Reason for closing:  Fixed
Comment by Jonathan Liu (net147) - Sunday, 25 April 2010, 08:38 GMT
To fix, add "sleep 1" in /etc/rc.d/deluge-web before the line:
echo $(pgrep -u $DELUGE_USER deluge-web) > /var/run/deluge-web.pid
Comment by Jonathan Liu (net147) - Sunday, 25 April 2010, 08:41 GMT
This also affects /etc/rc.d/deluged. "sleep 1" must be added to /etc/rc.d/deluged as well after:
echo $(pgrep -u $DELUGE_USER deluged) > /var/run/deluged.pid

There seems to be a race condition in both /etc/rc.d/deluged and /etc/rc.d/deluge-web between starting the daemon and getting the PID.
Adding a 1 second sleep before getting the PID resolves the issue for me.

Loading...