--On Sunday, December 8, 2002 7:09 PM +0000 [EMAIL PROTECTED] wrote:
@@ -1691,6 +1693,18 @@
c->child_cleanup = child_cleanup;
c->next = p->cleanups;
p->cleanups = c;
+ if(magic_cleanup) {
+ if(!magic_cleanup(data))
+ ap_log_error(APLOG_MARK, APLOG_WARNING, NULL,
+ "exec() may not be safe");
+ }
+}
Your editor seems to have been tab-happy.
+API_EXPORT(void) ap_note_cleanups_for_fd_ex(pool *p, int fd, int
domagic)
+{
+ if (domagic) {
+ ap_register_cleanup_ex(p, (void *) (long) fd,
fd_cleanup, fd_cleanup,
+ fd_magic_cleanup);
+ } else {
+ /* basically ap_register_cleanup but save the possible
+ overhead of an extraneous function call */
+ ap_register_cleanup_ex(p, (void *) (long) fd,
fd_cleanup, fd_cleanup,
+ NULL);
+ }
+}
Would it be better to simplify as:ap_register_cleanup_ex(p, (void *) (long) fd, fd_cleanup, fd_cleanup, domagic ? fd_magic_cleanup : NULL);
(Appears several other places, too.)
API_EXPORT(void) ap_kill_cleanups_for_socket(pool *p, int sock)
@@ -2603,19 +2681,19 @@
if (pipe_out) {
*pipe_out = ap_bcreate(p, B_RD);
- ap_note_cleanups_for_fd(p, fd_out);
+ ap_note_cleanups_for_fd_ex(p, fd_out, 0);
Why switch this? Wouldn't it have been the same thing, or are you
trying to save extra function calls whereever possible? -- justin