Ignore exit code zero from activated services
authorColin Walters <walters@verbum.org>
Mon, 14 Dec 2009 23:12:24 +0000 (18:12 -0500)
committerColin Walters <walters@verbum.org>
Thu, 28 Jan 2010 22:01:24 +0000 (17:01 -0500)
commitb7e77c6b035f634f372c1749e61c14bde18b5d95
tree2e7cc5c81b41e3b287bdd53e3b37dc7cd1d6104b
parenta8e620a0ff60eef983a9be95e2b27dbcdcbaf654
Ignore exit code zero from activated services

A variety of system components have migrated from legacy init into DBus
service activation.  Many of these system components "daemonize", which
involves forking.  The DBus activation system treated an exit as an
activation failure, assuming that the child process which grabbed the
DBus name didn't run first.

While we're in here, also differentiate in this code path between the
servicehelper (system) versus direct activation (session) paths.  In
the session activation path our error message mentioned a helper
process which was confusing, since none was involved.

Based on a patch and debugging research from Ray Strode <rstrode@redhat.com>
bus/activation.c
configure.in
test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service.in [new file with mode: 0644]
test/name-test/Makefile.am
test/name-test/run-test.sh
test/name-test/test-activation-forking.py [new file with mode: 0644]
test/test-service.c