httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@organic.com>
Subject Re: On the plate...
Date Mon, 17 Jun 1996 21:51:31 GMT

strerror is in my copy of Kernighan & Ritchie, so I say +1.

	Brian

On Mon, 17 Jun 1996, Howard Fear wrote:
> Here's the original email:
> 
> ------- Forwarded Message
> 
> > *Forwarded From* robh@imdb.com (Rob Hartill):
> > 
> > Thanks. The patch will be considered. Looks ok to me.
> > 
> > >From: David MacKenzie <djm@va.pubnix.com>
> > >Subject: friendlier error messages when external programs fail
> > >Affects: src/mod_cgi.c src/mod_include.c
> > >ChangeLog: Use strerror() where appropriate.
> > >Comments: Let's get out of the dark ages of errno!
> > >
> > >*** 1.1	1996/06/14 22:13:06
> > >--- ./mod_cgi.c	1996/06/14 22:15:11
> > >***************
> > >*** 199,205 ****
> > >       */
> > >      
> > >      sprintf(err_string,
> > >! 	    "exec of %s failed, errno is %d\n", r->filename, errno);
> > >      write(2, err_string, strlen(err_string));
> > >      exit(0);
> > >  }
> > >--- 211,217 ----
> > >       */
> > >      
> > >      sprintf(err_string,
> > >! 	    "exec of %s failed: %s\n", r->filename, strerror(errno));
> > >      write(2, err_string, strlen(err_string));
> > >      exit(0);
> > >  }
> > >
> > >*** 1.1	1996/06/14 22:29:26
> > >--- ./mod_include.c	1996/06/14 22:30:35
> > >***************
> > >*** 489,496 ****
> > >  #ifdef DEBUG_INCLUDE_CMD    
> > >      fprintf (dbg, "Exec failed\n");
> > >  #endif    
> > >!     sprintf(err_string, "httpd: exec of %s failed, errno is %d\n",
> > >! 	    SHELL_PATH,errno);
> > >      write (2, err_string, strlen(err_string));
> > >      exit(0);
> > >  }
> > >--- 494,501 ----
> > >  #ifdef DEBUG_INCLUDE_CMD    
> > >      fprintf (dbg, "Exec failed\n");
> > >  #endif    
> > >!     sprintf(err_string, "httpd: exec of %s failed: %s\n",
> > >! 	    SHELL_PATH,strerror(errno));
> > >      write (2, err_string, strlen(err_string));
> > >      exit(0);
> > >  }
> > >***************
> > >*** 524,531 ****
> > >              return 1;
> > >          if(!strcmp(tag,"cmd")) {
> > >              if(include_cmd(tag_val, r) == -1) {
> > >!                 log_printf(r->server, "failed command exec %s in %s",
> > >! 			   tag_val, file);
> > >                  rputs(error, r);
> > >              }
> > >              /* just in case some stooge changed directories */
> > >--- 529,536 ----
> > >              return 1;
> > >          if(!strcmp(tag,"cmd")) {
> > >              if(include_cmd(tag_val, r) == -1) {
> > >!                 log_printf(r->server, "failed command exec %s in %s: %s",
> > >! 			   tag_val, file, strerror(errno));
> > >                  rputs(error, r);
> > >              }
> > >              /* just in case some stooge changed directories */
> > 
> 
> ------- End of Forwarded Message
> 
> --
> Howard Fear      email1: howard_fear@pageplus.com
>                  email2: howard_fear@stortek.com
>                  http://www.pageplus.com/~hsf/
> 
> 

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS


Mime
View raw message