DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30913>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30913

apr_proc_create() has unexpected side effect

           Summary: apr_proc_create() has unexpected side effect
           Product: APR
           Version: 0.9.4
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: APR
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


apr_proc_create() on unix OS calls apr_pool_cleanup_for_exec() and
exit() in forked child process.  These functions call registered
functions.  This causes unexpected behaviour if registered functions
have side effect to the outside of process.

For example, I use svn_io_open_unique_file() in library of subversion.
This function can create temporary file which will be deleted when the
pool is cleaned up.  I wrote program that create temporary file and
pass the temporary file to external command using apr_proc_create().
This program doesn't performs what I intended to because pool cleanup
in child process deletes temporary file before executing external
command.

Similarly, exit() executes functions registered by atexit().

Thus apr_proc_create() should use _exit() instead of exit().  Although
I am not detailed about apr_pool_cleanup_for_exec(), it seems
overkill.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to