Thanks for clearing this up, Stoitcho.
Berndt, my guess is these two application at least needs interacting with
your launcher application, they need a reply from the launcher application
to go on running, and they seems not have timeout options. It may be based
on Win32 messages or some other IPC mechanisms, but I think this
interaction needs the main thread of your launcher application, so if you
blocked up the main thread, no reply will be sent.
Creating a new thread to wait for process exiting should be fine.
Best regards,
Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
I am not sure that we understand each other now.
The fault reporting system is a separate application that our testers use to
report faults on our software and is usually running on the computer that
the tester is using. This is not the application that the launcher is trying
to launch, it just happens to be one application that hangs whenever the
launcher is used. Which to me is odd, since Stoitcho said that the message
queues are per thread. I mean, if the launchers only task is to launch an
application (our own client application in this case) then when the
application is launched I don't see why blocking the launcher's main thread
(using WaitForExit) could do any harm. Actually that is what I want to do,
since I need to perform some cleanup after the client application has
terminated (remove extracted files etc.). Our own launched client app works
just fine during the time when the launcher is blocked waiting for the
client app exiting. But the fault reporting application just hangs until the
launcher exits. When the launcher exits, the fault-reporting app just
continues as if nothing had happened.
The launcher application is coded to only work with our own client
application (strong named assemblies and policies), so it shouldn't at all
be concerned with the fault-reporting app. And if there is no such thing as
a global message queue, then I certainly don't understand how our launcher
application could cause any other application (the fault reporting
application in this case) to stop responding....
Sorry if I was unclear about the setup in my previous postings.
/Berndt
> Thanks for clearing this up, Stoitcho.
>
[quoted text clipped - 15 lines]
> This mail should not be replied directly, please remove the word "online"
> before sending mail.
"Ying-Shen Yu[MSFT]" - 30 Jun 2004 09:16 GMT
Hi Berndt,
Will the fault reporting system work if you move the clean up code into the
Exited event handler and comment out the WaitForExit method?
If it works, this issue I think is still related to the message loop of the
launcher application.
To do further investigation on this issue, I suggest you try attaching a
debugger to the fault report system when it hangs, and check the call stack
on its threads, probably we can see which call made the application hang.
Note, to get the correct call stack information, you may need to load
symbol files for both the fault report system and the windows system.
Feel free to reply this thread if you have any problems on this issue.
Best regards,
Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
Stoitcho Goutsev \(100\) [C# MVP] - 30 Jun 2004 15:12 GMT
Well in this case it doesn't make any sense. Accept if the reporting
application do something weird like enumearting all windows and trying to
send some messages e.g. WM_GETTEXT in which case it will block.

Signature
Stoitcho Goutsev (100) [C# MVP]
> Hi Berndt,
>
[quoted text clipped - 20 lines]
> This mail should not be replied directly, please remove the word "online"
> before sending mail.