httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <>
Subject Re: [PATCH] Have logfiles closed on exec
Date Wed, 11 Dec 2002 16:49:43 GMT
Martin Kraemer wrote:
> In contrast to the patch in my previous reply (which called
> ap_note_cleanups_for_fd_ex() for *ALL* occurrences of ap_popenf()),
> we now have more open fd's in PHP again. The fd's of the fcntl() lock
> files are (created by ap_popenf() and) not closed.
> So, there's another potential for plugging fd's.
> Other candidates are the scoreboard file (where present) which needs
> not be inherited to children, the rewrite_log file, and mod_log_nw.c
> for netware (do they have FD_CLOEXEC? I assume not... ;-) 
> Basically, this leaves over only mod_mime_magic as a user for the non-_ex
> version of ap_popenf(), and that is only because it does the open...close
> in a tight loop which does not offer the possibility of a fork()/exec().
> As could be expected, the combined patch with the additional invocations
> of ap_popenf_ex() leaves open only the well known set of fds:

Shoudld the default behavior of ap_popenf be to perform the
magic cleanup then? We already do so with ap_open_piped_log().
To avoid too many changes, I've kept the behavior of all
non _ex functions as they were, but maybe that needs to be
   Jim Jagielski   [|]   [|]
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

View raw message