Would it be possible in the next version of .net to include an overloaded method of process.start so it DOES NOT inherit the handles of the starting process? We have a network application that is starting a child process and when it crashes the ports are not closed as the child process is still running (most cases we have to reboot the box to get the application working again).
1. Process A starts.
2. Process A opens a TCP port.
3. Process A starts Process B using System.Diagnostics.Process.Start
4. Process A terminates unexpectedly, and does not properly close its TCP port.
5. Process B maintains a copy of the handle to the TCP port.
6. As there is an existing open handle, the Operating System does not close the port when cleaning up dead resources for process A.
This URL goes it better detail