Re: Check whether a dbus caller is still alive
Thiago Macieira <[email protected]>
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Message-ID | <17626448.aYXSauE8ao@tjmaciei-mobl1> |
On Sunday, 1 October 2017 06:25:51 PDT David Llewellyn-Jones wrote: > Hi, > > I have an application that connects to a systemd service via the system > bus. The application makes a synchronous call which blocks, until the > service responds, which may take some time. > > My concern is that the application may get closed before the service > responds. Is there any way for the service to check whether the > invocation is still valid? If the application closes, I'd like the > service to stop the long-running operation. Sure. You can watch the NameOwnerChanged signal to see if that particular unique connection ID changes owner to "", indicating that it disconnected. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel Open Source Technology Center _______________________________________________ dbus mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dbus