haiku/headers/os/app
Ingo Weinhold 6bfd06d1ff BRoster::Launch() eventually launches the application in question
in several steps:
1. early pre-registration with the registrar ("I wanna launch the
   app, make sure noone interferes.")
2. load the app image
3. finish pre-registration with the registrar ("I have launched
   the app, here is its team ID.")
4. start app main thread
5. send "on launch" messages to the app (argv, refs, others)

If the app is already running or being launched, 1. fails with a
conclusive error code and returns the team ID and the pre-registration
token of the app. Steps 2 - 4 are skipped and only the messages are
delivered using the team ID returned by 1.

This change fixes a race condition: The failed early pre-registration
request obviously cannot return the team ID, if the other thread
launching the app has not finished step 3 yet. Thus the argv/refs
message would not get delivered and Launch() would not return the
correct team ID.

Now we wait for the pre-registration to be finished in this case, using
the former _IsAppPreRegistered() mechanism, which already provided
such a waiting feature for one request. It has been extended to
accomodate an arbitrary number of waiting requests and renamed to
_IsAppRegistered().

This fixed bug #763.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-31 17:54:16 +00:00
..
AppDefs.h Merge from layout management branch. 2006-08-26 16:21:15 +00:00
Application.h * There is now a server_read_only_memory structure that is placed in a (surprise!) 2006-04-25 20:12:06 +00:00
Clipboard.h * Got rid of the BClipboard::fCount. It was modified, but never read. 2005-01-13 00:54:00 +00:00
Cursor.h various changes to handling custom cursors: 2006-02-26 18:15:31 +00:00
Handler.h Some cleanup. 2006-06-14 18:31:15 +00:00
Invoker.h Cleanup! 2006-01-03 09:23:08 +00:00
Looper.h Some cleanup. 2006-06-14 18:31:15 +00:00
Message.h hope no one minds with this Dano-like version of BMessage::PrintToStream() 2006-07-10 20:00:07 +00:00
MessageFilter.h Cleanup! 2006-01-03 09:23:08 +00:00
MessageQueue.h * almost rewrote BMessageQueue; simplified code, removed over-extensive documentation, 2005-11-16 13:01:59 +00:00
MessageRunner.h Removed the detached version of the BMessageRunner object again, and instead 2006-04-02 14:47:01 +00:00
Messenger.h * reverted Adi's premature changes to BWindow and restored _DetermineTarget() and 2005-11-20 16:24:23 +00:00
PropertyInfo.h moved B_PROPERTY_INFO_TYPE definition to TypeConstants.h 2006-06-22 12:21:46 +00:00
Roster.h BRoster::Launch() eventually launches the application in question 2006-08-31 17:54:16 +00:00