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:04:42 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46425





--- Comment #17 from Bojan Smojver <bojan@rexursive.com>  2009-02-23 13:04:38 PST ---
> The problem was that the normal cleanup did flush the buffers. I only removed
the child cleanup, because close by FD_CLOEXEC does the right thing in this
case.

True. I misread the patch there.

> Unlinking the file is not done in the child cleanup (is_child == 0)

Not sure about this:
-------------------------
apr_status_t apr_unix_child_file_cleanup(void *thefile)
{
    return file_cleanup(thefile);
}


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

    if (close(file->filedes) == 0) {
        file->filedes = -1;
        if (file->flags & APR_DELONCLOSE) {
            unlink(file->fname);
        }
...
-------------------------

To me, that looks like it does actually unlink the file, even in the child
cleanup. No?

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