GDBus can't own names with DO_NOT_QUEUE flag
Submitted by Simon McVittie
Link to original bug (#784392)
Description
g_bus_own_name() and related functions cannot specify the DO_NOT_QUEUE flag, which means that a GDBus service cannot atomically carry out "take the name if there is no other owner" without resorting to direct method calls. The closest it can get is this pseudocode:
result = RequestName(name)
if result == IN_QUEUE:
ReleaseName(name)
result = EXISTS
return result
which could result in returning EXISTS but briefly owning the name (if we are reported to be in the queue, then the primary owner drops it and we get it moments before we call ReleaseName).