[w32handle] Remove use of w32handle for File, Console, Pipe and Socket (#5319)
[mono.git] / mono / metadata / w32process-unix.c
index 57340e9ed5ae5420cc572ab06bc88cfee7d0150d..280c3a9213d0a90fd528961ca4c14d878eba7d76 100644 (file)
@@ -1945,7 +1945,7 @@ process_create (const gunichar2 *appname, const gunichar2 *cmdline,
                dup2 (err_fd, 2);
 
                /* Close all file descriptors */
-               for (i = mono_w32handle_fd_reserve - 1; i > 2; i--)
+               for (i = eg_getdtablesize() - 1; i > 2; i--)
                        close (i);
 
 #ifdef DEBUG_ENABLED