Your message dated Sat, 21 Feb 2015 17:12:22 +0100
with message-id <[email protected]>
and subject line Re: Bug#416179: start-stop-daemon --background fails to do a
double fork
has caused the Debian Bug report #416179,
regarding start-stop-daemon --background returns with ppid != 1
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
416179: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416179
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dpkg
Version: 1.13.25
Severity: normal
start-stop-daemon --background forks once, not twice. Because of this,
sometimes the ppid of the launched won't be properly set to 1. This is
unfortunate in my case, where I want to fix the init.d script of
imapproxy (which doesn't have pidfile support) using --background:
imapproxy will actually do the double-fork&setsid dance when ppid!=1,
and this will this way actually happen sometimes, causing the pidfile
written out by s-s-d to be wrong.
For lenny, it'd be really cool if s-s-d could do the double-fork thingy,
so that the --background option (which is nearly always a workaround
anyway) will become a reliable, proper workaround.
--Jeroen
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-xen-k7
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Versions of packages dpkg depends on:
ii coreutils 5.97-5.3 The GNU core utilities
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
dpkg recommends no packages.
-- no debconf information
--
Jeroen van Wolffelaar
[email protected] (also for Jabber & MSN; ICQ: 33944357)
http://Jeroen.A-Eskwadraat.nl
--- End Message ---
--- Begin Message ---
Version: 1.17.14
Hi!
On Tue, 2007-05-15 at 16:45:43 +0300, Guillem Jover wrote:
> On Sun, 2007-03-25 at 16:17:32 +0200, Jeroen van Wolffelaar wrote:
> > Package: dpkg
> > Version: 1.13.25
> > Severity: normal
> >
> > start-stop-daemon --background forks once, not twice. Because of this,
> > sometimes the ppid of the launched won't be properly set to 1.
>
> That's not the problem, forking once should be enough (I've made s-s-d
> fork twice anyway, but not closed the bug as it does not fix your
> current problem). The problem here is that the parents are not reaped
> fast enough by the kernel, and when the exec gets started it's still
> linked to it's parents. Adding some delay fixes this, but I'm not sure
> what would be the cleanest way to implement that, maybe waiting until
> ppid == 1. Dunno, will have to think about it a bit.
The problem was that each parent needed to wait for its child, this is
now fixed in 1.17.14 as part of #686420.
Regards,
Guillem
--- End Message ---