haiku/headers/os
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
..
add-ons * Added new (currently private) API class BMimeSnifferAddon, 2006-06-09 20:48:50 +00:00
app BRoster::Launch() eventually launches the application in question 2006-08-31 17:54:16 +00:00
arch Added empty arch_debugger.h header file. 2005-03-03 06:07:59 +00:00
be_apps Added missing R5 headers. 2004-02-26 19:35:02 +00:00
device More headers for the new modules and PnP/device system - note, this 2004-06-06 23:52:08 +00:00
drivers * You can now create the block cache in read-only mode (using an additional 2006-08-30 23:18:31 +00:00
game cleanup 2006-08-26 09:16:56 +00:00
interface Merge from layout management branch. 2006-08-26 16:21:15 +00:00
kernel added core and core 2 ids 2006-08-24 10:33:50 +00:00
mail restore prior values for utf8 and null, for the sake of default send mail encoding settings 2004-11-17 01:56:18 +00:00
media Reworked media_format meta data handling. 2006-05-14 22:51:14 +00:00
midi code style update to match ours (kind of) 2006-06-19 13:24:04 +00:00
midi2 made midi server beos compatible 2006-06-17 14:04:46 +00:00
net * Fixed build of libnetapi.so - it probably won't work for now, though, have a look 2006-08-29 00:19:23 +00:00
opengl Ooops, I forgot this little change. Sorry guys to break libGL.so build in the previous 2006-05-09 21:57:42 +00:00
storage * integration of vector icons with the registrar and the mime data base 2006-08-29 17:06:23 +00:00
support Merge from layout management branch. 2006-08-26 16:21:15 +00:00
translation Some more GCC 4 and PPC fixes. 2006-05-19 15:52:21 +00:00
AppKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
Be.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
BeBuild.h Fixes that make Haiku build with gcc 4. Mainly out of the following 2005-11-12 23:27:14 +00:00
DeviceKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
GameKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
InterfaceKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
KernelKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
MailKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
MediaKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
MidiKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
NetKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
NetworkKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
OpenGLKit.h Removed GLX headers: was never there anyway! 2005-06-26 21:48:15 +00:00
StorageKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
SupportKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00
TranslationKit.h added these master include files for better R5 compatibility when compiling 2002-10-23 13:48:14 +00:00