[Mono-bugs] [Bug 76670][Nor] New - Kill() method of Process instance may not be working

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Nov 11 04:49:19 EST 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bill.seddon at lyquidity.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76670

--- shadow/76670	2005-11-11 04:49:19.000000000 -0500
+++ shadow/76670.tmp.6195	2005-11-11 04:49:19.000000000 -0500
@@ -0,0 +1,73 @@
+Bug#: 76670
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: bill.seddon at lyquidity.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Kill() method of Process instance may not be working
+
+Tested using 1.1.9.2
+
+Description:
+
+This attached code is provided to demonstrate some real differences 
+between the behaviour of the .NET and Mono Process class when 
+working on Windows.  Specifically that Process.Kill does not 
+appear to work.  I've not tested behaviour on Linux.
+
+The program is a facsimile for a part of a program I want. The
+program will launch another process (web browser).  The semantics
+are that the program is able to terminate if a user closes either 
+the launched web browser OR the main program.
+
+When run, this facsimile program will launch another instance of 
+itself as a proxy for the web browser and display a dummy form 
+(so that it does not terminate instantly).
+
+The title of the window displayed by the main or first started 
+process is "Main" while the title of the launched process is 
+"Launched".
+
+The "main" program keeps track of the process it launches 
+through a class variable called "proc".  It sets the "exited"
+event of the launched process so that it is able to monitor
+termination of the launched process and close itself when (if)
+the event is raised.  This works in both .NET and Mono.
+
+If the "main" program itself is terminated, it uses the Kill 
+method of the saved proc instance variable to terminate the
+launched process.  This works in .NET but not under Mono.  The 
+launched process remains in memory and is active after the main 
+process has exited.
+
+There are other behavioural differences.  In the Exit() method 
+below there are a couple of message boxes that can be uncommented.  
+When .Net is used, these display message boxes as you'd expect.
+Under Mono things go wrong in a significant way.  The boxes do not 
+paint properly and it is no possible to click the OK button.
+
+This behavoiour suggests that the MessageBox class does not have 
+its own message pump but instead relies on some global message 
+pump that has been terminated.
+
+To see the behaviour:
+
+Run the program and you will see two windows appear (they may be
+on top of each other).  
+
+1) The first test is to close the window that has the title 
+   "Launched Process".  This works successfully and both processes 
+   close under .Net and Mono.
+
+2) Run the program again But this time close the window with the
+   title "Main Process".  This works under .Net but not under Mono


More information about the mono-bugs mailing list