[Mono-dev] bugs from svn code
Gonzalo Paniagua Javier
gonzalo at ximian.com
Mon Nov 21 17:05:03 EST 2005
On Mon, 2005-11-21 at 14:05 -0600, Carlos Solorzano wrote:
> On Nov 21, 2005, at 1:30 PM, Gonzalo Paniagua Javier wrote:
>
> > On Mon, 2005-11-21 at 13:21 -0600, Carlos Solorzano wrote:
> >> Unhandled Exception: System.InvalidOperationException: Process ID has
> >> not been set.
> >> in <0x0005a> System.Diagnostics.Process:get_Id ()
> >> in (wrapper remoting-invoke-with-check)
> >> System.Diagnostics.Process:get_Id ()
> >> in <0x000ff> Proc.Class1:Run ()
> >
> > This is probably caused by the changes in r53198 and r53199.
> >
> > -Gonzalo
> >
> >
> >
>
> Looks like the ID problem is just when using ShellExecute. The ID
> returned from the extern method appears to be 0.
There's a comment in the code saying that there's no way to get the ID,
but... "The calling thread can use the WaitForInputIdle function to wait
until the new process has finished its initialization and is waiting for
user input with no input pending. This can be useful for synchronization
between parent and child processes, because CreateProcess returns
without waiting for the new process to finish its initialization. For
example, the creating process would use WaitForInputIdle before trying
to find a window associated with the new process."
-Gonzalo
More information about the Mono-devel-list
mailing list