You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2009/01/02 12:42:04 UTC

DO NOT REPLY [Bug 46425] Apr should set FD_CLOEXEC if APR_FOPEN_NOCLEANUP is not set

https://issues.apache.org/bugzilla/show_bug.cgi?id=46425





--- Comment #2 from Joe Orton <jo...@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
paranoia.


-- 
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