[Mono-osx] Monitoring external processes
Andrew at eVirtualStudio.com
Sun Sep 28 11:48:31 EDT 2008
I need to detect when the user closes a process that my application
launches. The following code works fine under .NET and Mono 2.0 on Windows
but does not work on the Mac OS. On the mac, the process correctly starts
the texeditor app. The problem is that HasExited incorrectly returns true
immediately even though the window has not been closed.
Dim Progname As String =
m_PATHDELIMITER + "Myfile.txt"
Dim DAWproc As New Process()
.FileName = Progname
.Verb = "Open"
.CreateNoWindow = True
While Not DAWproc.HasExited
I've already tried using GetProcessbyname but, according to other threads on
this forum, it appears that this function is not functioning correctly
under Mono either. Can anyone suggest how I can accomplish this seemingly
simple task in a reliable way that works on both Mac and Windows?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx