[Mono-bugs] [Bug 77819][Maj] New - System.Diagnostics.Process.GetCurrentProcess() fails from spawned process

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Mar 17 14:06:15 EST 2006


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 btimothy at novell.com.

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

--- shadow/77819	2006-03-17 14:06:14.000000000 -0500
+++ shadow/77819.tmp.32276	2006-03-17 14:06:15.000000000 -0500
@@ -0,0 +1,38 @@
+Bug#: 77819
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: btimothy at novell.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Diagnostics.Process.GetCurrentProcess() fails from spawned process
+
+I began to implement an automatic upgrade for my program and ran into this
+problem.  Here's the scenario:
+
+The program detects there's an upgrade available.  It downloads the new
+files for an upgrade, one of which is a shell script.  The program then
+uses Process.Start() to start the shell script and if successful, exits.
+
+Meanwhile, the shell script starts up and upgrades some RPMs.  When the
+upgrade is complete, the shell script attempts to launch the updated
+program.  The program needs to use Process.GetCurrentProcess() and gets an
+exception making that call.  The complete stack trace is:
+
+** (GetCurrentProcessBug.exe:30185): WARNING **: process_set_current: error
+looking up process handle 0x403
+
+Unhandled Exception: System.SystemException: Can't find current process
+in <0x00072> System.Diagnostics.Process:GetCurrentProcess ()
+in <0x00023> GetCurrentProcessBug:Main (System.String[] args)
+
+I will attach a sample program which shows the problem.


More information about the mono-bugs mailing list