apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r783958 - /apr/apr/trunk/file_io/unix/filedup.c
Date Thu, 11 Jun 2009 23:11:35 GMT
Author: bojan
Date: Thu Jun 11 23:11:34 2009
New Revision: 783958

URL: http://svn.apache.org/viewvc?rev=783958&view=rev
Log:
Retain the INHERIT/NOCLEANUP flags of new_file in apr_file_dup2().
Patch by Stefan Fritsch <sf sfritsch.de>.

Modified:
    apr/apr/trunk/file_io/unix/filedup.c

Modified: apr/apr/trunk/file_io/unix/filedup.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/filedup.c?rev=783958&r1=783957&r2=783958&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/filedup.c (original)
+++ apr/apr/trunk/file_io/unix/filedup.c Thu Jun 11 23:11:34 2009
@@ -35,12 +35,12 @@
             return APR_EINVAL;
         }
 #ifdef HAVE_DUP3
-        if (!(old_file->flags & (APR_FILE_NOCLEANUP|APR_INHERIT)))
+        if (!((*new_file)->flags & (APR_FILE_NOCLEANUP|APR_INHERIT)))
             flags |= O_CLOEXEC;
         rv = dup3(old_file->filedes, (*new_file)->filedes, flags);
 #else
         rv = dup2(old_file->filedes, (*new_file)->filedes);
-        if (!(old_file->flags & (APR_FILE_NOCLEANUP|APR_INHERIT))) {
+        if (!((*new_file)->flags & (APR_FILE_NOCLEANUP|APR_INHERIT))) {
             int flags;
 
             if (rv == -1)



Mime
View raw message