apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46425] Apr should set FD_CLOEXEC if APR_FOPEN_NOCLEANUP is not set
Date Mon, 23 Feb 2009 21:50:32 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46425





--- Comment #21 from Arkadiusz Miskiewicz <arekm@pld-linux.org>  2009-02-23 13:50:32
PST ---

Small suggestion - be safe when fcntl fails:

+        int fdflags = fcntl(fd, F_GETFD);
+        if (fdflags != -1) {
+            fdflags |= FD_CLOEXEC;
+            fcntl(fd, F_SETFD, fdflags);
+        }


ps. I'm currently using fcntl only (not complete, unix only, epoll) patch on
few machines with a success (decided to not use new API because it's only
suported by very fresh kernels (2.6.23+ for most of things and 2.6.27+ for
SOCK_CLOEXEC)).

http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/apr-bug-46425.patch

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message