You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trunk r780 on Debian sid
Originally reported at <http://bugs.debian.org/709169>.
NoDetachDaemon_Case leaves the daemon process running. Maybe specific to
Debians sh (dash 0.5.7). I shall patch this in trunk if someone confirms this
effects other systems.
$ PATH="`pwd`:/usr/local/bin:/bin:/usr/bin" PYTHONPATH="`pwd`/test" python2.7
Python 2.7.3 (default, Mar 5 2013, 01:19:40)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import testdistcc
>>> obj = testdistcc.NoDetachDaemon_Case()
>>> obj.setup()
>>> print obj.pid # the process reaped by killDaemon
3905
>>> print open(obj.daemon_pidfile, "r").read()
3906
>>> �
[1]+ Stopped PATH="`pwd`:/usr/local/bin:/bin:/usr/bin"
PYTHONPATH="`pwd`/test" python2.7
$ ps xf | grep distccd | grep -v grep
3905 pts/1 T 0:00 | \_ /bin/sh -c distccd «ARGS»
3906 pts/1 SN 0:00 | \_ distccd «ARGS»
3907 pts/1 SN 0:00 | \_ distccd «ARGS»
3908 pts/1 SN 0:00 | \_ distccd «ARGS»
3909 pts/1 SN 0:00 | \_ distccd «ARGS»
$ fg
PATH="`pwd`:/usr/local/bin:/bin:/usr/bin" PYTHONPATH="`pwd`/test" python2.7
>>> obj.killDaemon()
>>>
$ ps xf | grep distccd | grep -v grep
3906 pts/1 SN 0:00 distccd «ARGS»
3907 pts/1 SN 0:00 \_ distccd «ARGS»
3908 pts/1 SN 0:00 \_ distccd «ARGS»
3909 pts/1 SN 0:00 \_ distccd «ARGS»
$
The log file confirms “not detaching”.
You can see that ‘killDaemon’ reaps the shell process and the daemon
process survives. To me that seems strange and perhaps a bug; is there some
reason why the daemon should outlive the shell when ‘--no-detach’ is used?
Original issue reported on code.google.com by [email protected] on 25 May 2013 at 4:51
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 25 May 2013 at 4:51The text was updated successfully, but these errors were encountered: