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>
Tue, 16 Feb 2010 02:55:03 +0000 (18:55 -0800)
commit807b507a9f6cc3be8f12d68f7849da970652a9a6
treec345d3af168c56e19e543a57aea06691e3f5c771
parentc3c41ba1385b47dc2a167e963478779ad5c952fe
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