commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r897803 - in /commons/sandbox/runtime/trunk/src/main/native: os/unix/exec.c port/fdwalk.c
Date Mon, 11 Jan 2010 09:04:45 GMT
Author: mturk
Date: Mon Jan 11 09:04:45 2010
New Revision: 897803

URL: http://svn.apache.org/viewvc?rev=897803&view=rev
Log:
Close return EBADF on invalid file

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c
    commons/sandbox/runtime/trunk/src/main/native/port/fdwalk.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c?rev=897803&r1=897802&r2=897803&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/exec.c Mon Jan 11 09:04:45 2010
@@ -160,7 +160,7 @@
     }
     /* Close the file
      */
-    return close(fd);
+    return r_close(fd);
 }
 
 static int do_exec(acr_exec_t *ep, const char *executable,

Modified: commons/sandbox/runtime/trunk/src/main/native/port/fdwalk.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/port/fdwalk.c?rev=897803&r1=897802&r2=897803&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/port/fdwalk.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/port/fdwalk.c Mon Jan 11 09:04:45 2010
@@ -92,7 +92,7 @@
     for (fd = 0; fd < fm; fd++) {
         errno = 0;
         rc = (*func)(cd, fd);
-        if (rc && errno != ENOENT)
+        if (rc && errno != ENOENT && errno != EBADF)
             break;
     }
     return rc;



Mime
View raw message