Avoid a race between MicroB startup and establishing D-Bus watch for it
authorSteven Luo <steven+maemo@steven676.net>
Mon, 15 Feb 2010 01:58:53 +0000 (17:58 -0800)
committerSteven Luo <steven+maemo@steven676.net>
Mon, 15 Feb 2010 01:58:53 +0000 (17:58 -0800)
commita712d8d7275b6229d75cab5549794183c9dae891
tree16df9445436d7d15af1e95fa0876b340d4873cf3
parent870b63f0602922c0f135d3982f1febfe2706c243
Avoid a race between MicroB startup and establishing D-Bus watch for it

As it stands, the establishment of the D-Bus match and filter for the
acquisition of com.nokia.osso_browser happens in parallel with MicroB
startup; as a result, it's possible that MicroB could acquire the name
before we're ready to look for the event, which results in us waiting
forever for MicroB to start (even though it's already started).  Avoid
this by establishing the watch before we fork a child process.

Possibly fixes a rare failure mode reported by Faheem Pervez (qwerty12).
launcher.c