apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46425] Apr should set FD_CLOEXEC if APR_FOPEN_NOCLEANUP is not set
Date Mon, 23 Feb 2009 21:17:18 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46425





--- Comment #18 from Stefan Fritsch <sf@sfritsch.de>  2009-02-23 13:17:17 PST ---
(In reply to comment #14)
> > Unlinking the file is not done in the child cleanup (is_child == 0)
> 
> Not sure about this:
> ...
> -------------------------
> 
> To me, that looks like it does actually unlink the file, even in the child
> cleanup. No?

This was changed in trunk in r712674 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=712674
)
-------------------------
apr_status_t apr_unix_child_file_cleanup(void *thefile)
{
    return file_cleanup(thefile, 1);
}

static apr_status_t file_cleanup(apr_file_t *file, int is_child)
{
    apr_status_t rv = APR_SUCCESS;

    if (close(file->filedes) == 0) {
        file->filedes = -1;

        /* Only the parent process should delete the file! */
        if (!is_child && (file->flags & APR_DELONCLOSE)) {
            unlink(file->fname);
        }
...
-------------------------

Maybe that fix should be backported?

Another question: apr_unix_file_child_cleanup destroys the file's thread mutex.
But the pollsets also have a thread mutex that is not destroyed by their
cleanup function. Is this the correct behaviour?

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


Mime
View raw message