You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2010/01/31 14:46:16 UTC
svn commit: r905040 - /apr/apr/trunk/file_io/unix/open.c
Author: jorton
Date: Sun Jan 31 13:46:16 2010
New Revision: 905040
URL: http://svn.apache.org/viewvc?rev=905040&view=rev
Log:
* file_io/unix/open.c (apr_file_open): Don't set FD_CLOEXEC if it was
already set via O_CLOEXEC.
PR: 46297
Modified:
apr/apr/trunk/file_io/unix/open.c
Modified: apr/apr/trunk/file_io/unix/open.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/open.c?rev=905040&r1=905039&r2=905040&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/open.c (original)
+++ apr/apr/trunk/file_io/unix/open.c Sun Jan 31 13:46:16 2010
@@ -176,9 +176,11 @@
if ((flags = fcntl(fd, F_GETFD)) == -1)
return errno;
- flags |= FD_CLOEXEC;
- if (fcntl(fd, F_SETFD, flags) == -1)
- return errno;
+ if ((flags & FD_CLOEXEC) == 0) {
+ flags |= FD_CLOEXEC;
+ if (fcntl(fd, F_SETFD, flags) == -1)
+ return errno;
+ }
}
(*new) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
Re: svn commit: r905040 - /apr/apr/trunk/file_io/unix/open.c
Posted by Joe Orton <jo...@redhat.com>.
On Sun, Jan 31, 2010 at 10:21:30AM -0500, Jeff Trawick wrote:
> On Sun, Jan 31, 2010 at 8:46 AM, <jo...@apache.org> wrote:
> > Author: jorton
> > Date: Sun Jan 31 13:46:16 2010
> > New Revision: 905040
> >
> > URL: http://svn.apache.org/viewvc?rev=905040&view=rev
> > Log:
> > * file_io/unix/open.c (apr_file_open): Don't set FD_CLOEXEC if it was
> > already set via O_CLOEXEC.
> >
> > PR: 46297
>
> This looks like a useful+safe backport to get into 1.3.10 which I will
> tag Real Soon Now. Any concerns out there?
Yeah, I think it should be fine. I've merged it to 1.3.x and 1.4.x now.
Regards, Joe
Re: svn commit: r905040 - /apr/apr/trunk/file_io/unix/open.c
Posted by Jeff Trawick <tr...@gmail.com>.
On Sun, Jan 31, 2010 at 8:46 AM, <jo...@apache.org> wrote:
> Author: jorton
> Date: Sun Jan 31 13:46:16 2010
> New Revision: 905040
>
> URL: http://svn.apache.org/viewvc?rev=905040&view=rev
> Log:
> * file_io/unix/open.c (apr_file_open): Don't set FD_CLOEXEC if it was
> already set via O_CLOEXEC.
>
> PR: 46297
This looks like a useful+safe backport to get into 1.3.10 which I will
tag Real Soon Now. Any concerns out there?