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 Fri, 02 Jan 2009 11:42:04 GMT

--- Comment #2 from Joe Orton <jorton@redhat.com>  2009-01-02 03:42:04 PST ---
I think it would be good to do this.

Note that any place a particular object is changed to rely on FD_CLOEXEC for
closure after exec, the corresponding child cleanup needs to be changed (or if
appropriate, removed) since it will otherwise also try to close() the fd for a
second time.

Lots of system call invocations:

+        int fdflags = fcntl(fd, F_GETFD);
+        fdflags |= FD_CLOEXEC;
+        fcntl(fd, F_SETFD, fdflags);

without any error checking seems kinda bad, but maybe that's unnecessary

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

View raw message