Bug 18328 - Process: WaitForExit returns immediately for managed app that is still running
Summary: Process: WaitForExit returns immediately for managed app that is still running
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: 3.2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-03-12 16:28 UTC by Jon Goldberger [MSFT]
Modified: 2018-01-19 19:16 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Repro case from Novell bug report (526 bytes, application/x-gzip)
2014-03-12 16:28 UTC, Jon Goldberger [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Jon Goldberger [MSFT] 2014-03-12 16:28:49 UTC
Created attachment 6297 [details]
Repro case from Novell bug report

Porting this bug over from Novell bug tracker. Marek said that the the bug appears to still exist in Mono 3.2.7 

From Novell bug report:

When a managed server application is launched from the shell, and you want to
use another managed client app to wait until the server app to exit, then this
is no longer possible.

Process.WaitForExit immediately returns false (signalling that the process is
still running), instead of waiting for a given set of time for the process to
exit.
----------------------------------------------------------------------------------
To reproduce:

1. extract the attached gzipped tar archive.
2. run './test.sh'

Expected result:

The following output is written to the console after 3 seconds:

Process has exited: True

Actual result:

The following output is written to the console immediately:

Process has not exited: False
Comment 2 Zoltan Varga 2014-03-17 19:00:52 UTC
In unix its not possible in general to work for the termination of a non-child process.
Comment 3 Ludovic Henry 2018-01-19 19:16:08 UTC
This is just a feature generally not supported on Unix.