haiku/headers
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
..
build added B_BAD_DATA (it doesn't exist on R5) 2006-08-31 16:23:09 +00:00
compatibility/bsd restored sys/ioccom.h in headers/compatibility/bsd/ 2006-08-17 12:58:01 +00:00
cpp GCC 4 fix. 2005-12-11 16:22:51 +00:00
glibc Merged changes from branch build_system_redesign at revision 14573. 2005-10-29 16:27:43 +00:00
gnu adding gnu/termcap.h : is a copy of src/libs/termcap/termcap.h 2004-06-01 12:38:47 +00:00
legacy/network setsockopt and getsockopt use int as others functions 2006-06-23 14:19:11 +00:00
libs Merge from layout management branch. 2006-08-26 16:21:15 +00:00
os BRoster::Launch() eventually launches the application in question 2006-08-31 17:54:16 +00:00
posix Merge of branches/team/network/new_stack - not yet complete as SVN does only support 2006-08-08 12:33:33 +00:00
private BRoster::Launch() eventually launches the application in question 2006-08-31 17:54:16 +00:00
tools Fixed the build of the cppunit stuff; if you are using IMPORT/EXPORT you should 2004-05-05 16:19:03 +00:00