dbus fork problem
thiago at kde.org
Thu Apr 5 09:53:48 PDT 2007
Havoc Pennington wrote:
>Even in theory I'm not sure how a connection kept across fork() would
>work... the behavior would be tough to define.
>If you can spec out what you need then we can discuss the API.
I propose we don't do anything about it. If the application must do fork()
and both processes have working connections, at least one of the
connections should be a private one. And the connection used in the child
process should be opened only after forking.
The reason for that is that any other solution would probably break
states: suddenly a plugin or library finds itself in a new connection
(with a new unique name and without its well-known names).
To properly handle this case, libdbus would need an entry point to be
told "we have forked", so that it can close the connections and reopen
them (might fail!!), then call back to the binding code with such
information. And the bindings must propagate the information down to user
In all, not worth it IMHO.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070405/29612f01/attachment.pgp
More information about the dbus