exit after auto-start
Dave Plauger
Dave.Plauger at Sun.COM
Sun Oct 9 08:43:36 PDT 2005
Is there a reliable way for a service to exit?
I like using autostart. However, if several clients access the same service, it's not clear to me
how to code the service so that in can exit without losing a client. That is, client 1 can start the
service, client 2 right behind it can queue a message. If the service exits after handling client 1,
client 2 fails. I have seen this happen.
Here is my server loop:
/* process connection until disconnect */
while (dbus_connection_read_write_dispatch (connection, 1000))
;
I hope that I can add a test in this loop to see when it is safe to exit.
More information about the dbus
mailing list