Date: Sat, 09 Oct 2010 15:43:09 +0400 From: Anonymous <swell.k@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/151339: [patch] www/py-rssdler: clear pidfile on SIGTERM Message-ID: <86sk0fmw1e.fsf@gmail.com> Resent-Message-ID: <201010091150.o99Bo09Y089480@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 151339 >Category: ports >Synopsis: [patch] www/py-rssdler: clear pidfile on SIGTERM >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: Sat Oct 09 11:50:00 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: >Description: `rssdler -k' is pretty dangerous because it uses SIGKILL on a process that may not be even be rssdler. So, clean pidfile on SIGTERM that may be send by the user or during shutdown, cf. issue#56 on googlecode. >How-To-Repeat: 1. rssdler -d 2. pkill -f rssdler 3. check ~/.rssdler/daemon.info 1. echo -n $$ >~/.rssdler/daemon.info 2. rssdler -k >Fix: --- a.diff begins here --- Index: www/py-rssdler/Makefile =================================================================== RCS file: /a/.cvsup/ports/www/py-rssdler/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- www/py-rssdler/Makefile 22 Aug 2010 01:12:18 -0000 1.2 +++ www/py-rssdler/Makefile 9 Oct 2010 11:13:58 -0000 @@ -7,7 +7,7 @@ PORTNAME= rssdler PORTVERSION= 0.4.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www python MASTER_SITES= GOOGLE_CODE PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} Index: www/py-rssdler/files/patch-_main =================================================================== RCS file: www/py-rssdler/files/patch-_main diff -N www/py-rssdler/files/patch-_main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/py-rssdler/files/patch-_main 9 Oct 2010 10:50:15 -0000 @@ -0,0 +1,12 @@ +Index: rssdler.py +=================================================================== +--- rssdler.py (revision 169) ++++ rssdler.py (working copy) +@@ -2180,6 +2180,7 @@ + elif param == "--purge-saved": _action = 'purge-saved' + elif param == "--comment-config": _action = 'comment-config' + signal.signal(signal.SIGINT, signalHandler) ++ signal.signal(signal.SIGTERM, signalHandler) + sys.excepthook = setDebug #this is NOT supposed to be called! + if _action == 'comment-config': + print(commentConfig) --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86sk0fmw1e.fsf>