]> granicus.if.org Git - apache/commitdiff
apr_put_os_file() expected the caller to have an existing file or init to
authorGreg Stein <gstein@apache.org>
Fri, 26 Jan 2001 09:05:40 +0000 (09:05 +0000)
committerGreg Stein <gstein@apache.org>
Fri, 26 Jan 2001 09:05:40 +0000 (09:05 +0000)
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

modules/generators/mod_cgid.c

index 5377ebcd575c38b6eb553d73a1a81c8ce350671f..327477eb66f4174858547b38c5a18074dca0f2c7 100644 (file)
@@ -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"))