[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#41554: marked as done ([S-S-D] dpkg: start-stop-daemon --pidfile behaviour doesn't match documentation)

Your message dated Wed, 02 Jun 2004 14:47:05 -0400
with message-id <E1BValV-0001Cn-00@newraff.debian.org>
and subject line Bug#41554: fixed in dpkg 1.10.22
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 18 Jul 1999 04:50:41 +0000
Received: (qmail 25871 invoked from network); 18 Jul 1999 04:50:40 -0000
Received: from chardonnay.math.bme.hu (qmailr@
  by master.debian.org with SMTP; 18 Jul 1999 04:50:40 -0000
Received: (qmail 6301 invoked from network); 18 Jul 1999 04:50:33 -0000
Received: from line5.dial.bme.hu (qmailr@
  by chardonnay.math.bme.hu with SMTP; 18 Jul 1999 04:50:33 -0000
Received: (qmail 6202 invoked by uid 1000); 17 Jul 1999 22:57:10 -0000
Date: 17 Jul 1999 22:57:10 -0000
Message-ID: <19990717225710.6200.qmail@utopia>
From: korn@eik.bme.hu
Subject: dpkg: start-stop-daemon --pidfile behaviour doesn't match documentation
To: submit@bugs.debian.org
X-Mailer: bug 3.2.2

Package: dpkg
Severity: normal


I experimented a bit with start-stop-daemon and found that the passage on
the --pidfile switch in the manpage doesn't accurately describe the actual
behaviour of the program. It says in the manpage

       With --start , start-stop-daemon checks for the  existence
       of  a  specified  process.   If  such  a  process  exists,
       start-stop-daemon does nothing, and exits with error  sta­
       tus  1  (0  if  --oknodo is specified).  If such a process
       does not exist, it starts an instance,  using  either  the
       executable  specified  by  --exec  , (or, if specified, by
       --startas ).  Any arguments given after -- on the  command
       line are passed unmodified to the program being started.


       -p|--pidfile pid-file
              Check  for  processes whose process-id is specified
              in pid-file.

This would imply that start-stop-daemon reads the pidfile, and if it finds a
process with the PID from the pidfile running, it doesn't start a new
instance; if not, it does. However, all start-stop-daemon is really
concerned about is the _existence_ of the pidfile. Allow me to demonstrate:

[guy@utopia ~]$ start-stop-daemon -t --start --pidfile $SSH2_AGENT_PIDFILE --startas /usr/bin/ssh-agent2
Would start /usr/bin/ssh-agent2 .
[guy@utopia ~]$ start-stop-daemon --start --pidfile $SSH2_AGENT_PIDFILE --startas /usr/bin/ssh-agent2
SSH2_AUTH_SOCK=/tmp/ssh-guy/ssh2-6134-agent; export SSH2_AUTH_SOCK;
echo Agent pid 6135;
[guy@utopia ~]$ echo 6135 >$SSH2_AGENT_PIDFILE
[guy@utopia ~]$ start-stop-daemon -t --start --pidfile $SSH2_AGENT_PIDFILE --startas /usr/bin/ssh-agent2
(null) already running.
[guy@utopia ~]$ kill 6135
[guy@utopia ~]$ pidof ssh-agent2

[guy@utopia ~]$ start-stop-daemon -t --start --pidfile $SSH2_AGENT_PIDFILE --startas /usr/bin/ssh-agent2
(null) already running.
[guy@utopia ~]$ rm $SSH2_AGENT_PIDFILE
[guy@utopia ~]$ start-stop-daemon -t --start --pidfile $SSH2_AGENT_PIDFILE --startas /usr/bin/ssh-agent2
Would start /usr/bin/ssh-agent2 .

OR, instead of the rm command above:

[guy@utopia ~]$ start-stop-daemon -t --start --pidfile $SSH2_AGENT_PIDFILE --exec /usr/bin/ssh-agent2 --startas /usr/bin/ssh-agent2
Would start /usr/bin/ssh-agent2 .

So, specifying --exec along with --pidfile works. This is also evident after
a look at the output of strace.

Imho either the documentation should state more clearly that --pidfile only
makes sense if used along with --exec, or the program should be modified so
that it behaves in the way implied by the documentation. Personally, I would
prefer the latter.


  Andrew Korn (Korn Andras) <korn@eik.bme.hu>  http://goliat.eik.bme.hu/~korn
    Finger korn@goliat.eik.bme.hu for pgp key.  Homepage is obsolete. QOTD:
           Can't learn to do it well? Learn to enjoy doing it badly!

-- System Information
Debian Release: potato
Kernel Version: Linux utopia 2.2.10-ac10 #57 Wed Jul 14 14:08:37 CEST 1999 i586 unknown

Versions of the packages dpkg depends on:
ii  libc6           2.1.1-12       GNU C Library: Shared libraries and timezone
ii  libncurses4     4.2-3.2        Shared libraries for terminal handling
ii  libstdc++2.9-gl 2.91.66-2      The GNU stdc++ library (EGCS version)
Received: (at 41554-close) by bugs.debian.org; 2 Jun 2004 18:53:22 +0000
>From katie@ftp-master.debian.org Wed Jun 02 11:53:22 2004
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BVara-0007Xy-00; Wed, 02 Jun 2004 11:53:22 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1BValV-0001Cn-00; Wed, 02 Jun 2004 14:47:05 -0400
From: Scott James Remnant <scott@netsplit.com>
To: 41554-close@bugs.debian.org
X-Katie: $Revision: 1.49 $
Subject: Bug#41554: fixed in dpkg 1.10.22
Message-Id: <E1BValV-0001Cn-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Wed, 02 Jun 2004 14:47:05 -0400
Delivered-To: 41554-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-CrossAssassin-Score: 60

Source: dpkg
Source-Version: 1.10.22

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive:

  to pool/main/d/dpkg/dpkg-dev_1.10.22_all.deb
  to pool/main/d/dpkg/dpkg-doc_1.10.22_all.deb
  to pool/main/d/dpkg/dpkg_1.10.22.dsc
  to pool/main/d/dpkg/dpkg_1.10.22.tar.gz
  to pool/main/d/dpkg/dpkg_1.10.22_i386.deb
  to pool/main/d/dpkg/dselect_1.10.22_i386.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 41554@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Scott James Remnant <scott@netsplit.com> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.7
Date: Tue,  1 Jun 2004 18:21:40 -0300
Source: dpkg
Binary: dpkg-doc dpkg dselect dpkg-dev dpkg-static
Architecture: source all i386
Version: 1.10.22
Distribution: unstable
Urgency: low
Maintainer: Dpkg Development <debian-dpkg@lists.debian.org>
Changed-By: Scott James Remnant <scott@netsplit.com>
 dpkg       - Package maintenance system for Debian
 dpkg-dev   - Package building tools for Debian
 dpkg-doc   - Dpkg Internals Documentation
 dselect    - a user tool to manage Debian packages
Closes: 41554 81355 85079 85815 85818 96881 114946 120562 122910 133640 137719 140695 154422 175897 179648 192812 202997 204691 206163 211850 211856 212284 216695 217042 217823 218060 219623 221235 226800 226931 227169 229766 230242 230751 232317 232445 232639 232831 233282 235773 236331 237734 238483 241938 244624 245994 246103 246158 246159 246160 246161 246162 246163 246164 246359 246595 246857 247086 247116 248483 249254 249454 250176 250281 251830
 dpkg (1.10.22) unstable; urgency=low
   The DebConf4 Release.
   This release is mostly intended to mop up the minor and trivial bug
   fixes in the list and clear out the documentation changes.  As such,
   it should be treated with even more suspicion than is normal.
   * Use colouring to break cycles earlier to avoid long loops whilst
     installing or configuring packages.  Closes: #232445, #246857.
   * Don't try to configure packages that disappeared in the same
     run.  Closes: #202997.
   * Fix segfault when "gcc -dumpmachine" returns a non-matching triplet.
     Closes: #211850.
   * Remove restriction that package names be at least two characters long.
     Closes: #237734.
   * Fix dpkg-source (actually controllib.pl) to output the field name
     properly again.  Closes: #226931, #246595.
   * Make dpkg-scanpackages output Origin and Bugs fields with proper
     casing.  Closes: #154422.
   * Add support for DOS line-endings to md5sum.  Closes: #246103.
   * Fix start-stop-daemon segfault on Hurd.  Closes: #133640.
   * Allow dpkg-shlibdeps to run as non-root users.  Closes: #96881.
   * Correct various compiler warnings.  Closes: #229766.
   * Architecture Support:
     - Added x86-64 (x86_64 / amd64).  Closes: #238483, #241938.
     - Added i?86-gnu (Hurd).  Closes: #216695, #236331.
     - Added i386-kfreebsd-gnu and i386-knetbsd-gnu.  Closes: #250176.
   * Packaging:
     - Create $(docdir) even when --without-sgml-doc is passed so the
       ChangeLog can be installed.  Closes: #137719.
     - Stop hardcoding the list of manual page languages in debian/rules,
       so we include Spanish, Russian and Brazilian Portugese.  Closes: #245994.
     - Quote LDFLAGS in debian/rules to allow multiple options.
       Closes: #230242.
   * Documentation:
     - Move dpkg-scanpackages and dpkg-scansources to section 1 as they
       are user tools.  Closes: #114946.
     - Correct hyphen characters in manpages.  Closes: #212284, #247086, #226800.
     - Remove obsolete references to the Debian Packaging Manual.
       Closes: #122910, #140695.
     - Correct 'n' and 'p' key descriptions in dselect help message.
       Closes: #120562.
     - Add --force-bad-verify to dpkg manpage.  Closes: #192812.
     - Correct dpkg manpage to refer to --force-remove-reinstreq instead of
       -non-existant --force-reinstreq option.  Closes: #232831.
     - Correct documentation of --compare-versions arguments.  Closes: #232317.
     - Correct usage of "et al" to "et al.".  Closes: #230751.
     - Add dpkg-reconfigure(8) to SEE ALSO section of dpkg(8).  Closes: #233282.
     - Suggest packages that provide additional functionality in the dpkg
       manpage.  Closes: #81355.
     - Suggest dselect update in description of dpkg --update-avail.
       Closes: #206163.
     - Suggest aptitude as well as dselect.  Closes: #217042.
     - Suggest fakeroot for dpkg-source -r.  Closes: #175897.
     - Correct documentation of start-stop-daemon.  Closes: #41554, #211856.
     - Correct documentation of start-stop-daemon manpage to refer to --retry
       alongside --stop.  Closes: #204691.
     - Add note that start-stop-daemon will chdir("/") unless -d is specified.
       Closes: #217823, #218060.
     - Correct documentation of dpkg-query --list.  Closes: #232639.
     - Correct invalid use of &quot; within update-alternatives(8) with .BR.
       Closes: #244624.
     - Rewrite description of dpkg-source -i to indicate the intent of the
       default setting rather than the exact exclusions.  Closes: #227169.
     - Correct documentation of dpkg-statoverride --update.  Closes: #85079.
     - Correct documentation of update-alternatives --install.  Closes: #179648.
     - Documented dpkg:Version and dpkg:UpstreamVersion substvars.
       Closes: #85815, #85818.
     - Fix spelling error in utils/md5sum.1.  Closes: #250281.
     - Replace "&c." with the slightly clearer "etc.".  Closes: #235773.
     - Correct various typos.  Closes: #219623, #221235.
   * Updated Translations:
     - Catalan (Jordi Mallach).
     - French (Christian Perrier).  Closes: #246359.
     - Italian (Lele Gaifax).
     - Japanese manpages (KISE Hiroshi).  Closes: #248483.
     - Russian (Nikolai Prokoschenko).  Closes: #249254.
     - Spanish manpages (Ruben Porras).  Closes: #246158, #246159, #246160,
       #246161, #246162, #246163, #251830.
   * New Translations:
     - German start-stop-daemon and update-alternatives manpages
       (Helge Kreutzmann).  Closes: #247116, #249454.
     - Spanish dpkg-scansources manpage (Ruben Porras).  Closes: #246164.
 30f042fc1f3db3d9143438f4e2306149 798 base required dpkg_1.10.22.dsc
 2fc62cd054f1be7d1f8cb8073262a120 1714586 base required dpkg_1.10.22.tar.gz
 4bc9129933db0c7b0785a489c97731dc 1276700 base required dpkg_1.10.22_i386.deb
 e0475bfa90adb09db43e61eda465c362 119716 base required dselect_1.10.22_i386.deb
 0d64ddb21e386e1b126e5aaa2e9706c4 166218 utils standard dpkg-dev_1.10.22_all.deb
 acccec3738feda8e1ff7ad3fe7db005c 10616 doc optional dpkg-doc_1.10.22_all.deb

Version: GnuPG v1.2.4 (GNU/Linux)


Reply to: