Bug 151339 - [patch] www/py-rssdler: clear pidfile on SIGTERM
Summary: [patch] www/py-rssdler: clear pidfile on SIGTERM
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Philip M. Gollucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-09 12:50 UTC by swell.k
Modified: 2010-10-19 07:00 UTC (History)
0 users

See Also:


Attachments
a.diff (1.32 KB, patch)
2010-10-09 12:50 UTC, swell.k
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description swell.k 2010-10-09 12:50:00 UTC
`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
Comment 1 Edwin Groothuis freebsd_committer 2010-10-09 12:50:08 UTC
Class Changed
From-To: sw-bug->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer 2010-10-09 12:50:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

pgollucci@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 3 swell.k 2010-10-09 17:08:47 UTC
Also clear pidfile on runOnce.

  $ rssdler -ro
  $ cat ~/.rssdler/daemon.info

--- b.diff begins here ---
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 16:07:52 -0000
@@ -0,0 +1,14 @@
+Index: rssdler.py
+===================================================================
+--- rssdler.py	(revision 169)
++++ rssdler.py	(working copy)
+@@ -2085,6 +2085,9 @@
+             raise
+         if _runOnce:
+             logging.info( u"[Complete] %s" % time.asctime() )
++            try: codecs.open(os.path.join(getConfig()['global']['workingDir'],
++                getConfig()['global']['daemonInfo']), 'w', 'utf-8').write('')
++            except IOError, m: pass
+             break
+         logging.info( u"[Sleeping] %s" % time.asctime() )
+         checkSleep( getConfig()['global']['scanMins'] * 60 )
--- b.diff ends here ---
Comment 4 Philip M. Gollucci freebsd_committer 2010-10-10 05:36:42 UTC
State Changed
From-To: open->closed

Committed, Thanks!
Comment 5 dfilter service freebsd_committer 2010-10-10 05:36:44 UTC
pgollucci    2010-10-10 04:36:38 UTC

  FreeBSD ports repository

  Modified files:
    www/py-rssdler       Makefile 
  Added files:
    www/py-rssdler/files patch-rssdler.py 
  Log:
  - Clear pidfile on SIGTERM (cf. issue#56 on googlecode)
  - Bump PORTREVISION
  
  PR:             ports/151339
  Submitted by:   Anonymous <swell.k@gmail.com> (maintainer)
  
  Revision  Changes    Path
  1.3       +1 -1      ports/www/py-rssdler/Makefile
  1.1       +10 -0     ports/www/py-rssdler/files/patch-rssdler.py (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Philip M. Gollucci freebsd_committer 2010-10-10 19:52:30 UTC
State Changed
From-To: closed->open

missed
Comment 7 Philip M. Gollucci freebsd_committer 2010-10-19 06:56:21 UTC
State Changed
From-To: open->closed

Committed, Thanks!
Comment 8 dfilter service freebsd_committer 2010-10-19 06:56:22 UTC
pgollucci    2010-10-19 05:56:15 UTC

  FreeBSD ports repository

  Modified files:
    www/py-rssdler       Makefile 
  Added files:
    www/py-rssdler/files patch-_main patch-main 
  Removed files:
    www/py-rssdler/files patch-rssdler.py 
  Log:
  - Regenerate patches at maintainer/submitter request to be by function
    name instead of file name.
  
  PR:                             ports/151339
  Requested by    swell.k@gmail.com (maintainer)
  
  Revision  Changes    Path
  1.4       +1 -1      ports/www/py-rssdler/Makefile
  1.1       +12 -0     ports/www/py-rssdler/files/patch-_main (new)
  1.1       +14 -0     ports/www/py-rssdler/files/patch-main (new)
  1.2       +0 -10     ports/www/py-rssdler/files/patch-rssdler.py (dead)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"