[Mono-bugs] [Bug 650979] New: Wrong exit code returned from parent process

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 3 10:33:40 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=650979

https://bugzilla.novell.com/show_bug.cgi?id=650979#c0


           Summary: Wrong exit code returned from parent process
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: x86
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rajoo at mail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; sv-SE; rv:1.9.2.12)
Gecko/20101026 Firefox/3.6.12

When a process grabs its parent by Process.GetProcessById(), the exit code
returned from the parents Process instance is 0, even if the parent is still
alive. According to the source code, the exit code in this case should be equal
to STILL_ACTIVE (or 259).

This in turn results in wrong return value of the Process.HasExited property
because it is evaluated against the exit code.

Everything works as intended in Mono 2.6.7, but not since Mono 2.8.

I've attached some sample code which works fine on Mono 2.6.7 but fails on Mono
2.8. Compile and run parent.exe, which will spawn a child.exe waiting for its
parent to exit.

Reproducible: Always

Steps to Reproduce:
Compile the attached files and run parent.exe
Actual Results:  
[P] Parent started with pid 24100
[C] Child started with pid 24103, my expected parent pid is 24100
[C] Parent process found with pid 24100
[C] Parent seems to be dead
[C] Child exited
[P] Parent exited

Expected Results:  
[P] Parent started with pid 21443
[C] Child started with pid 21446, my expected parent pid is 21443
[C] Parent process found with pid 21443
[C] Waiting for parent...
[C] Waiting for parent...
[C] Waiting for parent...
[C] Waiting for parent...
[C] Waiting for parent...
[C] Waiting for parent...
[C] Waiting for parent...
[C] Waiting for parent...
[C] Waiting for parent...
[C] Waiting for parent...
[P] Parent exited
[C] Parent seems to be dead
[C] Child exited

Platform: Intel Atom
Operatingsystem: Meego (Linux 2.6.33.5)

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list