[PATCH 5/5] activation: implement upstart activation
Scott James Remnant
scott at netsplit.com
Thu Dec 23 15:07:23 PST 2010
On Thu, Dec 23, 2010 at 10:57 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
> On Thu, 23.12.10 22:46, Scott James Remnant (scott at netsplit.com) wrote:
>> >> + retval = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service),
>> >> + message, error);
>> > Am I missing something or is there no error path back?
>> Correct, an event is always successfully accepted by Upstart. I
>> realised I missed out the (needless) dbus_message_set_no_reply
>> (message) - I should put that in for completeness sake.
> But what happens if the service fails to start up? If you send no error
> message back on failure, then actviation will time-out. You definitely
> don't want that, especially since the method invocation timeouts on the
> client side are not particularly long.
The timeout case is the same as, for example, Upstart itself not
connecting to the bus.
All method calls are generally subject to a timeout; the default, as
you say, is pretty low. So the worst case here is that you send a
method call, D-Bus is selected to use Upstart for activation, it sends
an activation message to Upstart, which times out so the client gets a
As far as I can see, this is the same as the systemd path. The only
difference is you explicitly signal D-Bus on activation failure within
that timeout, whereas Upstart doesn't.
More information about the dbus