[Mono-dev] close on exec

Jacob Gladish jacobgladish at yahoo.com
Tue Sep 30 13:34:40 EDT 2008


I'm using p/invoke in my code and the library I'm calling into may call fork()/exec(), at which point the new process has dup'd copies of some of my open files. Sadly, one was a tcp listener, which means if I restart my application the bind() fails when I create an instance of a TcpListener. I'm curious if anyone can confirm the windows/.net behavior for this situation. As far as I know win32 handle inheritance is off unless specified, which leads me to believe that all fd's should be set close on exec by the mono runtime on unix variants. 


      


More information about the Mono-devel-list mailing list