Problem:
We get a deadlock when a dbus signal handler (es. signal handler 1) call a dbus method (es. method N) that rise a signal (es. signal 2) before return the reply.
Process Process
A B
signal 1
- <-----------x
signal |
handler 1 | method N
(wait method ret)| x-----------> -
| |
| signal 2 |
signal - <------------------x | method handler
handler 2 | | |
# # method N ret |
<------------ -
The solution, that you can find on attached patch consist of use a copy of the pending queue when we loop to dispatch, allowing to enqueue requests (from a dispatched request) on orignal pending queue without deadlock.
Fix dbus signal handler deadlock
=> Syncing Gitorious... [OK]
To git@gitorious.org:dbus-cplusplus/mainline.git
d1ec254..82c63b2 master -> master