[haiku-3rdparty-dev] Re: Messenger to remote target

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Tue, 15 Dec 2009 18:34:21 +0100

On 2009-12-15 at 18:07:45 [+0100], Rene Gollent <anevilyak@xxxxxxxxx> wrote:
> On Tue, Dec 15, 2009 at 10:54 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
> wrote:
> > The forked process is not a BApplication anymore (it hasn't
> > registered), so a BMessenger cannot target it.
> 
> If you do want to do something in this vein, loading the app intended
> as a remote via load_image() would work though, no? (assuming it
> starts a BApp of its own obviously).

After load_image() the new team's main thread isn't running yet, so it 
can't have created a BApplication yet. If you resume it immediately, you'll 
at least have a race condition. BRoster::Launch() employs darker magic 
though, which will allow you to target the application immediately after it 
returns (in fact even if it never creates a BApplication at all).

CU, Ingo

Other related posts: