apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucian Adrian Grijincu <lucian.griji...@avira.com>
Subject apr_proc_create cleanup before exec
Date Fri, 15 Sep 2006 12:29:01 GMT
Hi,
I was wondering if you'd consider adding support for used-defined 
cleanup functions that would be called in the child process, just before 
exec(3) in apr_proc_create (on fork-ing systems).
(such as closing all descriptors that are not needed in the new process).

Such a feature would imply

    * changing apr_procattr_t (to add a function pointer) [on unix]
    * modifying apr_proc_create to call apr_procattr_t's internal
      pointer function if it is set [on unix]
    * modifying apr_procattr_create to initialize this pointer to NULL
      [on unix]
    * typedefing the function pointer (for readability :) )
    * adding a setter function [does noting on non-unix]

I have personalized my version of APR, but I think this is really a good 
feature ( + it's backwards compatible with code that does not need such 
a feature) and I think I'm not the only one who'd benefit from it.

If you think this is a good idea I'll modify HEAD and post a patch.

-- 
Best regards,
Lucian Adrian Grijincu



Mime
View raw message