Author: dick
Date: 2005-04-21 17:05:32 -0400 (Thu, 21 Apr 2005)
New Revision: 43420

Modified:
   trunk/mono/mono/io-layer/ChangeLog
   trunk/mono/mono/io-layer/handles.c
Log:

2005-04-21  Dick Porter  <[EMAIL PROTECTED]>

        * handles.c (_wapi_handle_check_share): Make sure there is a "fd"
        dir in /proc before blowing away handle info.  Fixes bug 74649.




Modified: trunk/mono/mono/io-layer/ChangeLog
===================================================================
--- trunk/mono/mono/io-layer/ChangeLog  2005-04-21 20:46:46 UTC (rev 43419)
+++ trunk/mono/mono/io-layer/ChangeLog  2005-04-21 21:05:32 UTC (rev 43420)
@@ -1,5 +1,10 @@
 2005-04-21  Dick Porter  <[EMAIL PROTECTED]>
 
+       * handles.c (_wapi_handle_check_share): Make sure there is a "fd"
+       dir in /proc before blowing away handle info.  Fixes bug 74649.
+
+2005-04-21  Dick Porter  <[EMAIL PROTECTED]>
+
        * wait.c (WaitForMultipleObjectsEx): Implement special waits
 
        * handles.c (_wapi_handle_wait_signal_poll_share): Don't return a

Modified: trunk/mono/mono/io-layer/handles.c
===================================================================
--- trunk/mono/mono/io-layer/handles.c  2005-04-21 20:46:46 UTC (rev 43419)
+++ trunk/mono/mono/io-layer/handles.c  2005-04-21 21:05:32 UTC (rev 43420)
@@ -1511,7 +1511,7 @@
 {
        DIR *proc_dir;
        struct dirent *proc_entry;
-       gboolean found = FALSE;
+       gboolean found = FALSE, proc_fds = FALSE;
        pid_t self = getpid();
        int pid;
        guint32 now = (guint32)(time(NULL) & 0xFFFFFFFF);
@@ -1558,6 +1558,8 @@
                                continue;
                        }
                        
+                       proc_fds = TRUE;
+                       
                        while ((fd_entry = readdir (fd_dir)) != NULL) {
                                char path[_POSIX_PATH_MAX];
                                struct stat link_stat;
@@ -1591,7 +1593,7 @@
        
        closedir (proc_dir);
 
-       if (found == FALSE) {
+       if (found == FALSE && proc_fds == TRUE) {
                /* Blank out this entry, as it is stale */
 #ifdef DEBUG
                g_message ("%s: Didn't find it, destroying entry", __func__);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to