Attached is a patch that (for me) corrects the above problem in
killproc() from /lib/lsb/init-functions. It checks to see what signal
type was sent. If the signal type is 1 (HUP), it does not remove the PID
file.

** Attachment added: "Stop PID from being removed when HUP is sent."
   http://launchpadlibrarian.net/10934612/init-functions.patch

** Description changed:

  Binary package hint: lsb-base
  
  Whilst looking in to a bug with nagios2 (see bug #174466), I think there
  is a bug in the killproc() sub-routine within /lib/lsb/init-functions
  (from the lsb-base package). If an init script calls this sub-routine to
  issue a HUP siginal, the PID file is removed. For example:
  
  killproc -p $THEPIDFILE $DAEMON 1
  
  This causes an issue because the PID file is removed, even though a HUP
  is sent to the process and as a result, a future reload (e.g.
  /etc/init.d/nagios2 reload) causes two daemons to be spawned because the
  PID file has been removed so the daemon's init script believes the
  daemon has stopped.
+ 
+ Package: lsb-base
+ Priority: required
+ Section: misc
+ Installed-Size: 76
+ Maintainer: Ubuntu Core Developers <[EMAIL PROTECTED]>
+ Original-Maintainer: Chris Lawrence <[EMAIL PROTECTED]>
+ Architecture: all
+ Source: lsb
+ Version: 3.1-23.1ubuntu3
+ Replaces: lsb-core (<< 2.0-6), lsb (<< 2.0-6)
+ Depends: sed, ncurses-bin
+ Conflicts: lsb-core (<< 2.0-6), lsb (<< 2.0-6)
+ Filename: pool/main/l/lsb/lsb-base_3.1-23.1ubuntu3_all.deb
+ Size: 20176
+ MD5sum: cfcd198d912a3ac8846b58c883c9c14a
+ SHA1: 2dd7a35b92fb105ca4393a418dfcc869eab9b77e
+ SHA256: 3c3fc72e2eb258faed465ce840c6c7601ed681cecb800df0885d741f8fd87d3f
+ Description: Linux Standard Base 3.1 init script functionality
+  The Linux Standard Base (http://www.linuxbase.org/) is a standard
+  core system that third-party applications written for Linux can
+  depend upon.
+  .
+  This package only includes the init-functions shell library, which
+  may be used by other packages' initialization scripts for console
+  logging and other purposes.
+ Bugs: mailto:[EMAIL PROTECTED]
+ Origin: Ubuntu
+ 
+ This was noted in gusty. Other releases have not been tested or checked.

-- 
killproc routine removes PID file even if HUP is sent to process.
https://bugs.launchpad.net/bugs/176934
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to