Commit aea0cfec authored by Greg Stein's avatar Greg Stein
Browse files

apr_put_os_file() expected the caller to have an existing file or init to

NULL. using an existing file doesn't normally work: where would you get a
blank file to shove an FD into? expecting the user to assign to NULL is
error-prone (mod_isapi didn't).

*) always create and return a new file from apr_put_os_file()
*) reimplement apr_open_stderr() in terms of apr_put_os_file()
   [ except for win32... some issues there ]
*) remove some (obsolete) inits to NULL


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87851 13f79535-47bb-0310-9956-ffa450edef68
parent 8d7abd28
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -443,7 +443,7 @@ static int cgid_server(void *data)
        request_rec *r; 
        apr_procattr_t *procattr = NULL;
        apr_proc_t *procnew = NULL;
        apr_file_t *inout = NULL;
        apr_file_t *inout;


        len = sizeof(unix_addr);
@@ -743,7 +743,7 @@ static int cgid_handler(request_rec *r)
    int sd;
    char **env; 
    struct sockaddr_un unix_addr;
    apr_file_t *tempsock = NULL;
    apr_file_t *tempsock;
    apr_size_t nbytes;

    if(strcmp(r->handler,CGI_MAGIC_TYPE) && strcmp(r->handler,"cgi-script"))