cvs commit: apache/src conf.h
marc97/07/27 13:07:17 Modified:src conf.h Log: Make it compile under Unix after the change in revision 1.134 of httpd.h to make mod_status work under Win32 broke it. Revision ChangesPath 1.121 +3 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.120 retrieving revision 1.121 diff -u -r1.120 -r1.121 --- conf.h1997/07/27 18:44:04 1.120 +++ conf.h1997/07/27 20:07:16 1.121 @@ -621,6 +621,9 @@ #ifndef MODULE_VAR_EXPORT #define MODULE_VAR_EXPORT #endif +#ifndef API_VAR_EXPORT +#define API_VAR_EXPORT +#endif /* Do we have sys/resource.h; assume that BSD does. */ #ifndef HAVE_SYS_RESOURCE_H
cvs commit: apache/src conf.h httpd.h util.c
marc97/07/01 20:38:32 Modified:src conf.h httpd.h util.c Log: Get rid of LESS_SLACK_JACK in favor of existing NO_SLACK and make minor change to NO_SLACK to optimize out the ap_slack() function entirely when NO_SLACK is defined. Revision ChangesPath 1.110 +1 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.109 retrieving revision 1.110 diff -C3 -r1.109 -r1.110 *** conf.h1997/07/01 01:15:27 1.109 --- conf.h1997/07/02 03:38:30 1.110 *** *** 552,558 #define O_RDWR _O_RDWR #define SIGPIPE 17 /* Seems Windows is not a subgenius */ ! #define LESS_SLACK_JACK #include stddef.h /* Unknown system - Edit these to match */ #else --- 552,558 #define O_RDWR _O_RDWR #define SIGPIPE 17 /* Seems Windows is not a subgenius */ ! #define NO_SLACK #include stddef.h /* Unknown system - Edit these to match */ #else 1.124 +1 -1 apache/src/httpd.h Index: httpd.h === RCS file: /export/home/cvs/apache/src/httpd.h,v retrieving revision 1.123 retrieving revision 1.124 diff -C3 -r1.123 -r1.124 *** httpd.h 1997/07/01 06:46:03 1.123 --- httpd.h 1997/07/02 03:38:30 1.124 *** *** 773,779 * never fails. If the high line was requested and it fails it will also try * the low line. */ ! #ifdef LESS_SLACK_JACK #define ap_slack(fd,line) (fd) #else int ap_slack (int fd, int line); --- 773,779 * never fails. If the high line was requested and it fails it will also try * the low line. */ ! #ifdef NO_SLACK #define ap_slack(fd,line) (fd) #else int ap_slack (int fd, int line); 1.60 +3 -3 apache/src/util.c Index: util.c === RCS file: /export/home/cvs/apache/src/util.c,v retrieving revision 1.59 retrieving revision 1.60 diff -C3 -r1.59 -r1.60 *** util.c1997/06/30 22:50:41 1.59 --- util.c1997/07/02 03:38:30 1.60 *** *** 1391,1400 } #endif ! #ifndef LESS_SLACK_JACK int ap_slack (int fd, int line) { ! #if !defined(F_DUPFD) || defined(NO_SLACK) return fd; #else int new_fd; --- 1391,1400 } #endif ! #ifndef NO_SLACK int ap_slack (int fd, int line) { ! #if !defined(F_DUPFD) return fd; #else int new_fd; *** *** 1420,1423 return new_fd; #endif } ! #endif /* LESS_SLACK_JACK */ --- 1420,1423 return new_fd; #endif } ! #endif /* NO_SLACK */
cvs commit: apache/src conf.h
dgaudet 97/06/28 15:20:08 Modified:src Tag: APACHE_1_2_X conf.h Log: Missed Jim's NO_SLACK for A/UX. Revision ChangesPath No revision No revision 1.99.2.2 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.99.2.1 retrieving revision 1.99.2.2 diff -C3 -r1.99.2.1 -r1.99.2.2 *** conf.h1997/06/27 01:47:45 1.99.2.1 --- conf.h1997/06/28 22:20:06 1.99.2.2 *** *** 328,333 --- 328,334 * even on heavy systems sbrk() would be called at all... */ #define NO_LINGCLOSE + #define NO_SLACK #elif defined(SVR4) #define NO_KILLPG
cvs commit: apache/src conf.h
dgaudet 97/06/28 16:07:26 Modified:src conf.h Log: As discussed, enable flock serialized accept under freebsd, and a/ux. And I also enabled it under sunos4, I'm about to go double check that's correct for sunos4. Revision ChangesPath 1.105 +3 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.104 retrieving revision 1.105 diff -C3 -r1.104 -r1.105 *** conf.h1997/06/28 22:39:20 1.104 --- conf.h1997/06/28 23:07:25 1.105 *** *** 89,94 --- 89,95 typedef int rlim_t; #define memmove(a,b,c) bcopy(b,a,c) #define NO_LINGCLOSE + #define USE_FLOCK_SERIALIZED_ACCEPT #elif defined(SOLARIS2) #undef HAVE_GMTOFF *** *** 329,334 --- 330,336 */ #define NO_LINGCLOSE #define NO_SLACK + #define USE_FLOCK_SERIALIZED_ACCEPT #elif defined(SVR4) #define NO_KILLPG *** *** 411,416 --- 413,419 (defined(__FreeBSD_version) (__FreeBSD_version 22)) typedef quad_t rlim_t; #endif + #define USE_FLOCK_SERIALIZED_ACCEPT #elif defined(QNX) #ifndef crypt
cvs commit: apache/src conf.h
jim 97/06/28 18:58:32 Modified:src conf.h Log: Minor A/UX reordering Revision ChangesPath 1.106 +3 -4 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.105 retrieving revision 1.106 diff -C3 -r1.105 -r1.106 *** conf.h1997/06/28 23:07:25 1.105 --- conf.h1997/06/29 01:58:32 1.106 *** *** 318,336 #define NEED_STRDUP #define JMP_BUF sigjmp_buf /* fcntl() locking is expensive with NFS */ ! #undef USE_FLOCK_SERIALIZED_ACCEPT #define HAVE_SHMGET - #define MOVEBREAK 0x400 /* * NOTE: If when you run Apache under A/UX and you get a warning ! * that httpd couldn't move break, then the above value for * MOVEBREAK (64megs) is too large for your setup. Try reducing * to 0x200 which is still PLENTY of space. I doubt if * even on heavy systems sbrk() would be called at all... */ #define NO_LINGCLOSE #define NO_SLACK - #define USE_FLOCK_SERIALIZED_ACCEPT #elif defined(SVR4) #define NO_KILLPG --- 318,335 #define NEED_STRDUP #define JMP_BUF sigjmp_buf /* fcntl() locking is expensive with NFS */ ! #define USE_FLOCK_SERIALIZED_ACCEPT #define HAVE_SHMGET /* * NOTE: If when you run Apache under A/UX and you get a warning ! * that httpd couldn't move break, then the below value for * MOVEBREAK (64megs) is too large for your setup. Try reducing * to 0x200 which is still PLENTY of space. I doubt if * even on heavy systems sbrk() would be called at all... */ + #define MOVEBREAK 0x400 #define NO_LINGCLOSE #define NO_SLACK #elif defined(SVR4) #define NO_KILLPG
cvs commit: apache/src conf.h
jim 97/06/23 17:27:36 Modified:src conf.h Log: A/UX doesn't have slack problem. Besides, it's limited to 128fd's so it needs as many as it can get :) Revision ChangesPath 1.103 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.102 retrieving revision 1.103 diff -C3 -r1.102 -r1.103 *** conf.h1997/06/23 23:56:16 1.102 --- conf.h1997/06/24 00:27:36 1.103 *** *** 328,333 --- 328,334 * even on heavy systems sbrk() would be called at all... */ #define NO_LINGCLOSE + #define NO_SLACK #elif defined(SVR4) #define NO_KILLPG
cvs commit: apache/src conf.h http_main.c
dgaudet 97/06/16 13:04:54 Modified:src conf.h http_main.c Log: Remove C++ style comment. Only define O_BINARY if it isn't already defined (who knows, there may be some unix out there ...). Now that O_BINARY is defined for all architectures we can remove some EMX special cases. Clean up a signal for consistency. Revision ChangesPath 1.101 +3 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.100 retrieving revision 1.101 diff -C3 -r1.100 -r1.101 *** conf.h1997/06/15 19:22:24 1.100 --- conf.h1997/06/16 20:04:51 1.101 *** *** 504,510 /* Put your NT stuff here - Ambarish */ /* temporarily replace crypt */ ! //char *crypt(const char *pw, const char *salt); #define crypt(buf,salt) (buf) /* Although DIR_TYPE is dirent (see nt/readdir.h) we need direct.h for --- 504,510 /* Put your NT stuff here - Ambarish */ /* temporarily replace crypt */ ! /* char *crypt(const char *pw, const char *salt); */ #define crypt(buf,salt) (buf) /* Although DIR_TYPE is dirent (see nt/readdir.h) we need direct.h for *** *** 626,632 --- 626,634 #include fcntl.h #include limits.h #define closesocket(s) close(s) + #ifndef O_BINARY #define O_BINARY (0) + #endif #else /* WIN32 */ #include winsock.h 1.154 +1 -11 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.153 retrieving revision 1.154 diff -C3 -r1.153 -r1.154 *** http_main.c 1997/06/16 19:32:50 1.153 --- http_main.c 1997/06/16 20:04:52 1.154 *** *** 975,986 #else scoreboard_fname = server_root_relative (p, scoreboard_fname); - #ifdef __EMX__ - /* OS/2 needs binary mode set. */ scoreboard_fd = popenf(p, scoreboard_fname, O_CREAT|O_BINARY|O_RDWR, 0644); - #else - scoreboard_fd = popenf(p, scoreboard_fname, O_CREAT|O_RDWR, 0644); - #endif if (scoreboard_fd == -1) { perror (scoreboard_fname); --- 975,981 *** *** 1001,1012 #ifdef SCOREBOARD_FILE if (scoreboard_fd != -1) pclosef (p, scoreboard_fd); - #ifdef __EMX__ - /* OS/2 needs binary mode set. */ scoreboard_fd = popenf(p, scoreboard_fname, O_CREAT|O_BINARY|O_RDWR, 0666); - #else - scoreboard_fd = popenf(p, scoreboard_fname, O_CREAT|O_RDWR, 0666); - #endif if (scoreboard_fd == -1) { perror (scoreboard_fname); --- 996,1002 *** *** 1501,1507 signal (SIGHUP, (void (*)(int))restart); #endif /* SIGHUP */ #ifdef SIGUSR1 ! signal (SIGUSR1, (void (*)())restart); #endif /* SIGUSR1 */ #endif } --- 1491,1497 signal (SIGHUP, (void (*)(int))restart); #endif /* SIGHUP */ #ifdef SIGUSR1 ! signal (SIGUSR1, (void (*)(int))restart); #endif /* SIGUSR1 */ #endif }
cvs commit: apache/src conf.h
ben 97/06/04 00:03:12 Modified:src conf.h Log: SCO3 doesn't have writev. Revision ChangesPath 1.99 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.98 retrieving revision 1.99 diff -C3 -r1.98 -r1.99 *** conf.h1997/05/29 04:50:26 1.98 --- conf.h1997/06/04 07:03:11 1.99 *** *** 271,276 --- 271,277 #undef NO_KILLPG #undef NO_SETSID #define NEED_INITGROUPS + #define NO_WRITEV #define JMP_BUF sigjmp_buf #define SIGURG SIGUSR1 /* but note, this signal will be sent to a process group if enabled (for OOB data). It is not currently enabled. */ #include sys/time.h
cvs commit: apache/src conf.h
jim 97/03/24 14:54:52 Modified:src conf.h Log: MachTen typo Revision ChangesPath 1.88 +2 -2 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.87 retrieving revision 1.88 diff -C3 -r1.87 -r1.88 *** conf.h1997/03/02 18:15:11 1.87 --- conf.h1997/03/24 22:54:51 1.88 *** *** 464,476 #ifndef __MACHTEN_68K__ #define __MACHTEN_68K__ #endif ! #define FLOCK_SERIALIZED_ACCEPT #define NO_USE_SIGACTION #define USE_LONGJMP #undef NEED_STRDUP #else #define HAVE_SHMGET ! #define FCNTL_SERIALIZED_ACCEPT #endif /* Convex OS v11 */ --- 464,476 #ifndef __MACHTEN_68K__ #define __MACHTEN_68K__ #endif ! #define USE_FLOCK_SERIALIZED_ACCEPT #define NO_USE_SIGACTION #define USE_LONGJMP #undef NEED_STRDUP #else #define HAVE_SHMGET ! #define USE_FCNTL_SERIALIZED_ACCEPT #endif /* Convex OS v11 */
cvs commit: apache/src conf.h
randy 97/03/02 08:12:52 Modified:src conf.h Log: FreeBSD 2.2 portability Revision ChangesPath 1.86 +3 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.85 retrieving revision 1.86 diff -C3 -r1.85 -r1.86 *** conf.h1997/02/25 21:04:42 1.85 --- conf.h1997/03/02 16:12:51 1.86 *** *** 395,401 --- 395,404 #define HAVE_MMAP #define DEFAULT_USER nobody #define DEFAULT_GROUP nogroup + #if defined(__bsdi__) || \ + (defined(__FreeBSD_version) (__FreeBSD_version 22)) typedef quad_t rlim_t; + #endif #elif defined(QNX) #ifndef crypt
cvs commit: apache/src conf.h util.c
jim 97/03/02 10:15:13 Modified:src conf.h util.c Log: Typo changes HAS_GMTOFF - HAVE_GMTOFF... Revision ChangesPath 1.87 +2 -2 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.86 retrieving revision 1.87 diff -C3 -r1.86 -r1.87 *** conf.h1997/03/02 16:12:51 1.86 --- conf.h1997/03/02 18:15:11 1.87 *** *** 115,121 #elif defined(HIUX) #define HAVE_SYS_RESOURCE_H ! #undef HAS_GMTOFF #define NO_KILLPG #undef NO_SETSID #ifndef _HIUX_SOURCE --- 115,121 #elif defined(HIUX) #define HAVE_SYS_RESOURCE_H ! #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID #ifndef _HIUX_SOURCE *** *** 431,437 #undef NEED_STRCASECMP #undef NEED_STRNCASECMP #undef NEED_STRDUP ! #undef HAS_GMTOFF #define NO_KILLPG #undef NO_SETSID #define HAVE_RESOURCE 1 --- 431,437 #undef NEED_STRCASECMP #undef NEED_STRNCASECMP #undef NEED_STRDUP ! #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID #define HAVE_RESOURCE 1 1.46 +1 -1 apache/src/util.c Index: util.c === RCS file: /export/home/cvs/apache/src/util.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C3 -r1.45 -r1.46 *** util.c1997/02/28 11:51:35 1.45 --- util.c1997/03/02 18:15:12 1.46 *** *** 104,110 } /* What a pain in the ass. */ ! #if defined(HAS_GMTOFF) struct tm *get_gmtoff(int *tz) { time_t tt = time(NULL); struct tm *t = localtime(tt); --- 104,110 } /* What a pain in the ass. */ ! #if defined(HAVE_GMTOFF) struct tm *get_gmtoff(int *tz) { time_t tt = time(NULL); struct tm *t = localtime(tt);
cvs commit: apache/src conf.h
marc97/02/17 18:56:39 Modified:src conf.h Log: Fix JMB_BUF typo. Submitted by: Michael P. Krutikov [EMAIL PROTECTED] Revision ChangesPath 1.80 +1 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.79 retrieving revision 1.80 diff -C3 -r1.79 -r1.80 *** conf.h1997/02/17 11:05:01 1.79 --- conf.h1997/02/18 02:56:37 1.80 *** *** 477,483 #define NO_TIMEZONE #include stdio.h #include sys/types.h ! #define JMB_BUF jmp_buf typedef int rlim_t; #elif defined(ISC) --- 477,483 #define NO_TIMEZONE #include stdio.h #include sys/types.h ! #define JMP_BUF jmp_buf typedef int rlim_t; #elif defined(ISC)
cvs commit: apache/src conf.h http_main.c
jim 97/02/09 16:40:10 Modified:src conf.h http_main.c Log: A/UX and SCO3 timeval cleanups Revision ChangesPath 1.77 +5 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.76 retrieving revision 1.77 diff -C3 -r1.76 -r1.77 *** conf.h1997/02/04 23:54:22 1.76 --- conf.h1997/02/10 00:40:08 1.77 *** *** 252,257 --- 252,258 #define JMP_BUF sigjmp_buf #define SIGURG SIGUSR1 /* but note, this signal will be sent to a process group if enabled (for OOB data). It is not currently enabled. */ #define getwd(d) getcwd(d,MAX_STRING_LEN) + #include sys/time.h #elif defined(SCO5) *** *** 282,287 --- 283,292 extern int accept(), gethostname(), connect(), lstat(); extern int select(), killpg(), shutdown(); extern int initgroups(), setsockopt(); + extern char *shmat(int, char *, int); + extern int shmctl(int, int, struct shmid_ds *); + extern int shmget(key_t, int, int); + extern char *sbrk(int); extern char *crypt(); extern char *getwd(); #include sys/time.h 1.117 +0 -7 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.116 retrieving revision 1.117 diff -C3 -r1.116 -r1.117 *** http_main.c 1997/02/04 23:54:23 1.116 --- http_main.c 1997/02/10 00:40:08 1.117 *** *** 92,104 #include sys/types.h #include sys/ipc.h #include sys/shm.h - #if defined(AUX)/* Aren't defined anyplace */ - extern char *shmat(int, char *, int); - extern int shmctl(int, int, struct shmid_ds *); - extern int shmget(key_t, int, int); - extern char *sbrk(int); - #include sys/time.h - #endif #endif #ifdef SecureWare #include sys/security.h --- 92,97
cvs commit: apache/src conf.h
jim 97/01/26 13:17:11 Modified:src conf.h Log: A/UX needs sys/time.h for btestread Revision ChangesPath 1.74 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.73 retrieving revision 1.74 diff -C3 -r1.73 -r1.74 *** conf.h1997/01/25 22:38:23 1.73 --- conf.h1997/01/26 21:17:10 1.74 *** *** 269,274 --- 269,275 extern int initgroups(), setsockopt(); extern char *crypt(); extern char *getwd(); + #include sys/time.h #undef HAVE_GMTOFF #undef NO_KILLPG #undef NO_SETSID
cvs commit: apache/src conf.h
brian 97/01/24 12:55:10 Modified:src conf.h Log: Reviewed by: Marc Slemko, Roy T. Fielding Submitted by: Brian Behlendorf Needed prototype for ap_vsnprintf, and that needed varargs.h for va_list. Revision ChangesPath 1.72 +2 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.71 retrieving revision 1.72 diff -C3 -r1.71 -r1.72 *** conf.h1997/01/20 23:55:10 1.71 --- conf.h1997/01/24 20:55:08 1.72 *** *** 480,485 --- 480,486 */ #include sys/types.h + #include stdarg.h /* * We use snprintf() to avoid overflows, but we include * our own version (ap_snprintf). Allow for people to use their *** *** 490,495 --- 491,497 #define ap_vsnprintfvsnprintf #else int ap_snprintf(char *buf, size_t len, const char *format,...); + int ap_vsnprintf(char *buf, size_t len, const char *format, va_list ap); #endif #if !defined(NEXT) !defined(CONVEXOS) *** *** 661,667 void syslog (int, char *, ...); char *mktemp (char *); - #include stdarg.h long vfprintf (FILE *, char *, va_list); #endif --- 663,668
cvs commit: apache/src conf.h http_main.c http_main.h http_protocol.c
ben 96/12/15 07:09:37 Modified:src conf.h http_main.c http_main.h http_protocol.c Log: Fix keepalive timeout and waitpid substitutes. Revision ChangesPath 1.60 +0 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.59 retrieving revision 1.60 diff -C3 -r1.59 -r1.60 *** conf.h1996/12/12 16:45:32 1.59 --- conf.h1996/12/15 15:09:33 1.60 *** *** 94,100 #define HAVE_SHMGET #define HAVE_CRYPT_H #define NO_LONG_DOUBLE - #define BROKEN_WAIT #elif defined(HPUX) || defined(HPUX10) #define HAVE_SYS_RESOURCE_H --- 94,99 1.96 +25 -4 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.95 retrieving revision 1.96 diff -C3 -r1.95 -r1.96 *** http_main.c 1996/12/10 01:11:58 1.95 --- http_main.c 1996/12/15 15:09:34 1.96 *** *** 453,459 } } ! void hard_timeout (char *name, request_rec *r) { timeout_req = r; timeout_name = name; --- 453,459 } } ! void keepalive_timeout (char *name, request_rec *r) { timeout_req = r; timeout_name = name; *** *** 465,470 --- 465,479 alarm (r-server-timeout); } + void hard_timeout (char *name, request_rec *r) + { + timeout_req = r; + timeout_name = name; + + signal(SIGALRM,(void (*)())timeout); + alarm (r-server-timeout); + } + void soft_timeout (char *name, request_rec *r) { timeout_name = name; *** *** 941,962 } } ! #ifdef BROKEN_WAIT /* Some systems appear to fail to deliver dead children to wait() at times. ! This sorts them out. */ ! void reap_children() { int status,n; for(n=0 ; n HARD_SERVER_LIMIT ; ++n) if(scoreboard_image-servers[n].status != SERVER_DEAD waitpid(scoreboard_image-servers[n].pid,status,WNOHANG) == -1 errno == ECHILD) { update_child_status(n,SERVER_DEAD,NULL); } } #endif --- 950,977 } } ! #if defined(BROKEN_WAIT) || defined(NEED_WAITPID) /* Some systems appear to fail to deliver dead children to wait() at times. ! This sorts them out. In fact, this may have been caused by a race condition ! in wait_or_timeout(). But this routine is still useful for systems with no ! waitpid(). */ ! int reap_children() { int status,n; + int ret=0; for(n=0 ; n HARD_SERVER_LIMIT ; ++n) if(scoreboard_image-servers[n].status != SERVER_DEAD waitpid(scoreboard_image-servers[n].pid,status,WNOHANG) == -1 errno == ECHILD) { + sync_scoreboard_image(); update_child_status(n,SERVER_DEAD,NULL); + ret=1; } + return ret; } #endif *** *** 968,973 --- 983,989 static int wait_or_timeout(int *status) { + #ifndef NEED_WAITPID int ret; ret=waitpid(-1,status,WNOHANG); *** *** 977,982 --- 993,1003 return -1; } return ret; + #else + if(!reap_children()) + sleep(1); + return -1; + #endif } #else 1.7 +1 -0 apache/src/http_main.h Index: http_main.h === RCS file: /export/home/cvs/apache/src/http_main.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C3 -r1.6 -r1.7 *** http_main.h 1996/12/01 20:28:28 1.6 --- http_main.h 1996/12/15 15:09:34 1.7 *** *** 86,91 --- 86,92 */ void hard_timeout (char *, request_rec *); + void keepalive_timeout (char *, request_rec *); void soft_timeout (char *, request_rec *); void kill_timeout (request_rec *); void reset_timeout (request_rec *); 1.83 +1 -1 apache/src/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache/src/http_protocol.c,v retrieving revision 1.82 retrieving revision 1.83 diff -C3 -r1.82 -r1.83 *** http_protocol.c 1996/12/12 00:27:59 1.82 --- http_protocol.c 1996/12/15 15:09:35 1.83 *** *** 652,658 /* Get the request... */ ! hard_timeout (read, r); if (!read_request_line (r)) return NULL; if (!r-assbackwards)
cvs commit: apache/src conf.h
ben 96/12/12 08:45:34 Modified:src conf.h Log: Fix waitpid() substiture for NeXT. Revision ChangesPath 1.59 +1 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.58 retrieving revision 1.59 diff -C3 -r1.58 -r1.59 *** conf.h1996/12/10 20:12:30 1.58 --- conf.h1996/12/12 16:45:32 1.59 *** *** 202,208 #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 ! #define waitpid(a,b,c) wait4(a,(union wait *)b,c,NULL) typedef int pid_t; #define JMP_BUF jmp_buf #define NO_USE_SIGACTION --- 202,208 #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 ! #define waitpid(a,b,c) wait4((a) == -1 ? 0 : (a),(union wait *)(b),c,NULL) typedef int pid_t; #define JMP_BUF jmp_buf #define NO_USE_SIGACTION
cvs commit: apache/src conf.h
ben 96/12/05 02:30:08 Modified:src conf.h Log: Correct crypt definition. Revision ChangesPath 1.54 +1 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.53 retrieving revision 1.54 diff -C3 -r1.53 -r1.54 *** conf.h1996/12/04 01:43:03 1.53 --- conf.h1996/12/05 10:30:07 1.54 *** *** 65,71 #define HAVE_SYS_RESOURCE_H #undef NO_KILLPG #undef NO_SETSID ! char *crypt(char *pw, char *salt); #define JMP_BUF sigjmp_buf #define HAVE_MMAP #include sys/time.h --- 65,71 #define HAVE_SYS_RESOURCE_H #undef NO_KILLPG #undef NO_SETSID ! char *crypt(const char *pw, const char *salt); #define JMP_BUF sigjmp_buf #define HAVE_MMAP #include sys/time.h
cvs commit: apache/src conf.h
randy 96/12/03 07:58:54 Modified:src conf.h Log: Make this change more portable. Revision ChangesPath 1.50 +2 -2 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.49 retrieving revision 1.50 diff -C3 -r1.49 -r1.50 *** conf.h1996/12/02 16:07:23 1.49 --- conf.h1996/12/03 15:58:33 1.50 *** *** 294,300 #undef NO_SETSID #define JMP_BUF sigjmp_buf #define DEFAULT_USER nobody ! #define DEFAULT_GROUP nobody typedef quad_t rlim_t; #elif defined(UTS21) --- 294,300 #undef NO_SETSID #define JMP_BUF sigjmp_buf #define DEFAULT_USER nobody ! #define DEFAULT_GROUP nogroup typedef quad_t rlim_t; #elif defined(UTS21) *** *** 321,327 #define JMP_BUF sigjmp_buf #define HAVE_MMAP #define DEFAULT_USER nobody ! #define DEFAULT_GROUP nobody typedef quad_t rlim_t; #elif defined(QNX) --- 321,327 #define JMP_BUF sigjmp_buf #define HAVE_MMAP #define DEFAULT_USER nobody ! #define DEFAULT_GROUP nogroup typedef quad_t rlim_t; #elif defined(QNX)
cvs commit: apache/src conf.h
ben 96/12/03 09:44:28 Modified:src conf.h Log: NeXT fix. Revision ChangesPath 1.52 +7 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.51 retrieving revision 1.52 diff -C3 -r1.51 -r1.52 *** conf.h1996/12/03 17:35:28 1.51 --- conf.h1996/12/03 17:44:24 1.52 *** *** 188,193 --- 188,200 #ifndef S_IWUSR #define S_IWUSR S_IWRITE #endif + #ifndef S_IWGRP + #define S_IWGRP 20 + #endif + #ifndef S_IWOTH + #define S_IWOTH 02 + #endif + #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2
cvs commit: apache/src conf.h
jim 96/12/03 17:43:05 Modified:src conf.h Log: typo Revision ChangesPath 1.53 +1 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.52 retrieving revision 1.53 diff -C3 -r1.52 -r1.53 *** conf.h1996/12/03 17:44:24 1.52 --- conf.h1996/12/04 01:43:03 1.53 *** *** 362,368 #define bzero(a,b) memset(a,0,b) #define getwd(d) getcwd(d,MAX_STRING_LEN) #define JMP_BUF sigjmp_buf ! #define FCNTL_SERIALIZED_ACCEPT #define HAVE_MMAP #define HAVE_CRYPT_H --- 362,368 #define bzero(a,b) memset(a,0,b) #define getwd(d) getcwd(d,MAX_STRING_LEN) #define JMP_BUF sigjmp_buf ! #define USE_FCNTL_SERIALIZED_ACCEPT #define HAVE_MMAP #define HAVE_CRYPT_H
cvs commit: apache/src conf.h
jim 96/09/23 07:02:15 Modified:src conf.h Log: Fine tuning Revision ChangesPath 1.38 +2 -2 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.37 retrieving revision 1.38 diff -C3 -r1.37 -r1.38 *** conf.h1996/09/12 21:18:49 1.37 --- conf.h1996/09/23 14:02:14 1.38 *** *** 50,56 * */ ! /* $Id: conf.h,v 1.37 1996/09/12 21:18:49 jim Exp $ */ /* * conf.h: system-dependant #defines and includes... --- 50,56 * */ ! /* $Id: conf.h,v 1.38 1996/09/23 14:02:14 jim Exp $ */ /* * conf.h: system-dependant #defines and includes... *** *** 253,259 * to 0x200 which is still PLENTY of space. I doubt if * even on heavy systems sbrk() would be called at all... */ ! #undef NO_LINGCLOSE #elif defined(SVR4) #define NO_KILLPG --- 253,259 * to 0x200 which is still PLENTY of space. I doubt if * even on heavy systems sbrk() would be called at all... */ ! #define NO_LINGCLOSE #elif defined(SVR4) #define NO_KILLPG
Re: cvs commit: apache/src conf.h
Roy Fielding [EMAIL PROTECTED] writes: fielding96/08/13 22:08:08 Modified:src conf.h Log: Added prototype of gethostname for SOLARIS2. Submitted by: Roy Fielding Hmm, we've been through all this before and I'm still pretty convinced that gethostname is not something we should use on Solaris 2. The reason there's no prototype for it (Solaris 2 does have full prototyping) is because it's part of the BSD compatibility library. - NOTES Use of these interfaces should be restricted to only appli- cations written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-thread applica- tions is unsupported. - You've hidden the warning now and this may well bite us when we have a threaded server. My OS abstraction example explicity used hostname resolution as an example, it should use uname were possible (more widely available) and gethostname if not. On of the things I'd like to get cracking on but 1.2 is effectively in feature freeze indefinately. -- Paul Richards. Originative Solutions Ltd. (Netcraft Ltd. contractor) Elsevier Science TIS online journal project. Email: [EMAIL PROTECTED] Phone: 0370 462071 (Mobile), +44 (0)1865 843155
cvs commit: apache/src conf.h
fielding96/08/13 22:08:08 Modified:src conf.h Log: Added prototype of gethostname for SOLARIS2. Submitted by: Roy Fielding Revision ChangesPath 1.33 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C3 -r1.32 -r1.33 *** conf.h1996/08/06 18:28:41 1.32 --- conf.h1996/08/14 05:08:07 1.33 *** *** 85,90 --- 85,91 #define USE_FCNTL_SERIALIZED_ACCEPT #define HAVE_MMAP #define HAVE_CRYPT_H + int gethostname(char *name, int namelen); #elif defined(IRIX) #undef HAVE_GMTOFF
cvs commit: apache/src conf.h
jim 96/08/04 18:45:09 Modified:src conf.h Log: Be specific Revision ChangesPath 1.31 +1 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C3 -r1.30 -r1.31 *** conf.h1996/07/30 19:36:59 1.30 --- conf.h1996/08/05 01:45:08 1.31 *** *** 397,403 #include memory.h #endif ! #include regex.h #ifdef HAVE_SYS_RESOURCE_H #include sys/resource.h --- 397,403 #include memory.h #endif ! #include regex.h #ifdef HAVE_SYS_RESOURCE_H #include sys/resource.h
cvs commit: apache/src conf.h http_config.c http_config.h http_core.c http_core.h
ben 96/07/27 06:08:31 Modified:src conf.h http_config.c http_config.h http_core.c http_core.h Log: Major rehash of setrlimit stuff, for two reasons, first, to make it compile, and second, to remove much redundant code. Revision ChangesPath 1.26 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C3 -r1.25 -r1.26 *** conf.h1996/07/25 19:49:03 1.25 --- conf.h1996/07/27 13:08:27 1.26 *** *** 217,222 --- 217,223 #define HAVE_SYS_SELECT_H #define USE_FCNTL_SERIALIZED_ACCEPT #define HAVE_MMAP + #define NEED_SYS_RESOURCE_H #define SecureWare /* Although SCO 5 defines these in strings.h (note the s) they don't have 1.15 +1 -0 apache/src/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache/src/http_config.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C3 -r1.14 -r1.15 *** http_config.c 1996/07/16 19:39:12 1.14 --- http_config.c 1996/07/27 13:08:28 1.15 *** *** 395,400 --- 395,401 return pstrcat (parms-pool, cmd-name, not allowed here, NULL); parms-info = cmd-cmd_data; + parms-cmd = cmd; switch (cmd-args_how) { case RAW_ARGS: 1.8 +1 -0 apache/src/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache/src/http_config.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C3 -r1.7 -r1.8 *** http_config.h 1996/07/16 19:39:12 1.7 --- http_config.h 1996/07/27 13:08:28 1.8 *** *** 123,128 --- 123,129 char *path; /* If configuring for a directory, * pathname of that directory. */ + command_rec *cmd; /* configuration command */ } cmd_parms; /* This structure records the existence of handlers in a module... */ 1.21 +50 -83apache/src/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C3 -r1.20 -r1.21 *** http_core.c 1996/07/27 02:49:34 1.20 --- http_core.c 1996/07/27 13:08:29 1.21 *** *** 839,859 return NULL; } ! char *set_limit_cpu (cmd_parms *cmd, core_dir_config *conf, char *arg) { - #ifdef RLIMIT_CPU char *str; ! quad_t cur = 0; ! quad_t max = 0; if ((str = getword_conf(cmd-pool, arg))) if (!strcasecmp(str, max)) ! cur = conf-limit_cpu-rlim_max; else cur = atol(str); else { ! log_error(Invalid parameters for RLimitCPU, cmd-server); ! return NULL; } if ((str = getword_conf(cmd-pool, arg))) --- 839,859 return NULL; } ! static void set_rlimit(cmd_parms *cmd, struct rlimit *limit, char *arg) { char *str; ! /* If your platform doesn't define rlim_t then typedef it in conf.h */ ! rlim_t cur = 0; ! rlim_t max = 0; if ((str = getword_conf(cmd-pool, arg))) if (!strcasecmp(str, max)) ! cur = limit-rlim_max; else cur = atol(str); else { ! log_printf(cmd-server, Invalid parameters for %s, cmd-cmd-name); ! return; } if ((str = getword_conf(cmd-pool, arg))) *** *** 861,957 /* if we aren't running as root, cannot increase max */ if (geteuid()) { ! conf-limit_cpu-rlim_cur = cur; if (max) ! log_error(Must be uid 0 to raise maximum RLIMIT_CPU, cmd-server); } else { if (cur) ! conf-limit_cpu-rlim_cur = cur; if (max) ! conf-limit_cpu-rlim_max = max; } - #else - log_error(RLimitCPU not supported on this platform, cmd-server); - #endif - return NULL; } ! char *set_limit_mem (cmd_parms *cmd, core_dir_config *conf, char *arg) { ! #if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) ! char *str; ! quad_t cur = 0; ! quad_t max = 0; ! ! if ((str = getword_conf(cmd-pool, arg))) ! if (!strcasecmp(str, max)) ! cur = conf-limit_mem-rlim_max; ! else ! cur = atol(str); ! else { ! log_error(Invalid parameters for RLimitMEM, cmd-server); ! return NULL; ! }
Re: cvs commit: apache/src conf.h http_config.c http_config.h http_core.c http_core.h
Ben --- I'd very much like a change to this patch. Introducing the 'cmd' member of cmd_parms constitutes a change to the API; I really think these should be discussed on the list before being committed. This one, in any case, is unnecessary. The cmd_data of the callback structure already exists precisely to allow a command handler to behave differently depending on which command table entry caused it to be invoked; if the relevant command table entries looked like { RLimitCPU, no_set_limit, RLimitCPU, ... }, { RLimitNPROC, no_set_limit, RLimitNPROC, ... }, the name under which no_set_limit was invoked would be in cmd-info. As long as I'm looking the code more over with a tighter eye than formally (sigh...), I just noticed the use of RAW_ARGS; this is something we may want to change before final release --- the problem with it is that while TAKE1, TAKE2, and the like provide some sort of guidance to an external agent which is trying to parse the config file (perhaps through a mod_info-style intermediary), RAW_ARGS is essentially useless. I understand that you aren't personally responsible for this, but still, in the long run, we ought to change it. (I've been thinking that maybe adding a TAKE2OPT-style command-handling directive, which would be like TAKE2 except that it allowed the args to be missing, would be a good idea). One last gripe --- the command handlers seem to be logging errors in cases where they really ought to be returning a syntax error string --- i.e., in cases where the args are just syntactically invalid. This really ought to change... rst
cvs commit: apache/src conf.h http_core.c http_core.h
randy 96/07/27 09:21:21 Modified:src conf.h http_core.c http_core.h Log: Further setrlimit cleanup. Revert to existing HAVE_RESOURCE mechanism. Added rlim_t type for FreeBSD, BSDI, SUNOS4 and NetBSD Revision ChangesPath 1.27 +13 -8 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C3 -r1.26 -r1.27 *** conf.h1996/07/27 13:08:27 1.26 --- conf.h1996/07/27 16:21:16 1.27 *** *** 64,70 /* Define one of these according to your system. */ #if defined(SUNOS4) #define HAVE_GMTOFF ! #define HAVE_RESOURCE #undef NO_KILLPG #undef NO_SETSID char *crypt(char *pw, char *salt); --- 64,70 /* Define one of these according to your system. */ #if defined(SUNOS4) #define HAVE_GMTOFF ! #define HAVE_SYS_RESOURCE_H #undef NO_KILLPG #undef NO_SETSID char *crypt(char *pw, char *salt); *** *** 72,83 #define HAVE_MMAP #include sys/time.h #define NEED_STRERROR #elif defined(SOLARIS2) #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID ! #define HAVE_RESOURCE #define bzero(a,b) memset(a,0,b) #define getwd(d) getcwd(d,MAX_STRING_LEN) #define JMP_BUF sigjmp_buf --- 72,84 #define HAVE_MMAP #include sys/time.h #define NEED_STRERROR + typedef int rlim_t; #elif defined(SOLARIS2) #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID ! #define HAVE_SYS_RESOURCE_H #define bzero(a,b) memset(a,0,b) #define getwd(d) getcwd(d,MAX_STRING_LEN) #define JMP_BUF sigjmp_buf *** *** 97,103 #define BROKEN_WAIT #elif defined(HPUX) || defined(HPUX10) ! #define HAVE_RESOURCE #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID --- 98,104 #define BROKEN_WAIT #elif defined(HPUX) || defined(HPUX10) ! #define HAVE_SYS_RESOURCE_H #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID *** *** 217,223 #define HAVE_SYS_SELECT_H #define USE_FCNTL_SERIALIZED_ACCEPT #define HAVE_MMAP ! #define NEED_SYS_RESOURCE_H #define SecureWare /* Although SCO 5 defines these in strings.h (note the s) they don't have --- 218,224 #define HAVE_SYS_SELECT_H #define USE_FCNTL_SERIALIZED_ACCEPT #define HAVE_MMAP ! #define HAVE_SYS_RESOURCE_H #define SecureWare /* Although SCO 5 defines these in strings.h (note the s) they don't have *** *** 270,279 --- 271,282 #define USE_FCNTL_SERIALIZED_ACCEPT #elif defined(__NetBSD__) + #define HAVE_SYS_RESOURCE_H #define HAVE_GMTOFF #undef NO_KILLPG #undef NO_SETSID #define JMP_BUF sigjmp_buf + typedef quad_t rlim_t; #elif defined(UTS21) #undef HAVE_GMTOFF *** *** 293,303 --- 296,308 #define timezone_bky_timezone #elif defined(__FreeBSD__) || defined(__bsdi__) + #define HAVE_SYS_RESOURCE_H #define HAVE_GMTOFF #undef NO_KILLPG #undef NO_SETSID #define JMP_BUF sigjmp_buf #define HAVE_MMAP + typedef quad_t rlim_t; #elif defined(QNX) #undef NO_KILLPG *** *** 341,351 #endif /* Do we have sys/resource.h; assume that BSD does. */ ! #ifndef HAVE_RESOURCE #ifdef BSD ! #define HAVE_RESOURCE #endif ! #endif /* HAVE_RESOURCE */ /* * The particular directory style your system supports. If you have dirent.h --- 346,356 #endif /* Do we have sys/resource.h; assume that BSD does. */ ! #ifndef HAVE_SYS_RESOURCE_H #ifdef BSD ! #define HAVE_SYS_RESOURCE_H #endif ! #endif /* HAVE_SYS_RESOURCE_H */ /* * The particular directory style your system supports. If you have dirent.h *** *** 392,398 #endif #include regex/regex.h ! #ifdef HAVE_RESOURCE #include sys/resource.h #ifdef SUNOS4 int getrlimit( int, struct rlimit *); --- 397,403 #endif #include regex/regex.h ! #ifdef HAVE_SYS_RESOURCE_H #include sys/resource.h #ifdef SUNOS4 int getrlimit( int, struct rlimit *); 1.23 +1 -1 apache/src/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C3 -r1.22 -r1.23 *** http_core.c 1996/07/27 13:25:05 1.22 --- http_core.c 1996/07/27 16:21:17 1.23 *** *** 1021,1027 { MaxClients, set_server_limit, NULL, RSRC_CONF, TAKE1, NULL }, { MaxRequestsPerChild, set_max_requests, NULL, RSRC_CONF, TAKE1, NULL },
Re: cvs commit: apache/src conf.h http_config.c http_config.h http_core.c http_core.h
Unfortunately it is also used in set_rlimit. I'm happy to discuss it, though. It seemed like a useful and harmless addition to me, and it is back compatible, unlike many other changes that I'd really like to make. It strikes me as creeping featurism. The problem is that there was *already* a way to do this, via the cmd_info machinery. Adding another, by itself, isn't *so* bad, but once these harmless additions start to pile up, keeping track of the interactions of all the redundant, but slightly different mechanisms, gets to be really awkward. Better not to create the situation in the first place, if there's an easy way to avoid it --- and in this case there is. Using the preexisting cmd_info instead of your new thing wouldn't add a single line of code to your command handlers, or to the command tables that invoke them; given that, it's going to be awfully hard to convince me that cmd-cmd makes them easier to write. How about TAKE1|TAKE2? Assuming there are considerably less than 32 possibilities, that is. This opens a larger can of worms than it appears to --- that idea looks fine in this particular case, but combinations like FLAG|TAKE1 (On, Off, or maybe something else?), FLAG|TAKE2 (A flag and an optional argument? On, Off, or maybe something else, and an optional argument?) or even worse, something like RAW_ARGS|ITERATE, are a lot harder to interpret. Best to leave the command table entry indicating a *single* grammar for the arguments --- TAKE1 vs. TAKE2 is really just about the only case where the command parser can distinguish the alternatives without additional information. BTW, I notice this is going on on apache-cvs. I thought the reply-to address on CVS update notices was supposed to bounce comments on them back to the main list? rst
cvs commit: apache/src conf.h
akosut 96/07/27 14:39:47 Modified:src conf.h Log: Cause HP-UX to compile. Revision ChangesPath 1.28 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C3 -r1.27 -r1.28 *** conf.h1996/07/27 16:21:16 1.27 --- conf.h1996/07/27 21:39:45 1.28 *** *** 110,115 --- 110,116 #endif #define JMP_BUF sigjmp_buf #define HAVE_MMAP + typedef int rlim_t; #elif defined(AIX) #undef HAVE_GMTOFF
cvs commit: apache/src conf.h http_main.c
jim 96/07/18 11:44:47 Modified:src conf.h http_main.c Log: lingering close no work with A/UX and longjmp fluff Revision ChangesPath 1.23 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C3 -r1.22 -r1.23 *** conf.h1996/07/17 23:20:49 1.22 --- conf.h1996/07/18 18:44:44 1.23 *** *** 238,243 --- 238,244 #undef USE_FLOCK_SERIALIZED_ACCEPT #define HAVE_SHMGET #define MOVEBREAK 0x400 + #define NO_LINGCLOSE /* These are to let -Wall compile more cleanly */ extern int strcasecmp(const char *, const char *); extern int strncasecmp(const char *,const char *,unsigned); 1.53 +2 -2 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C3 -r1.52 -r1.53 *** http_main.c 1996/07/18 18:27:16 1.52 --- http_main.c 1996/07/18 18:44:45 1.53 *** *** 1123,1129 signal (SIGALRM, SIG_IGN); alarm (0); is_graceful=0; ! #ifdef NEXT longjmp(restart_buffer,1); #else siglongjmp(restart_buffer,1); --- 1123,1129 signal (SIGALRM, SIG_IGN); alarm (0); is_graceful=0; ! #if defined(NEXT) || defined(USE_LONGJMP) longjmp(restart_buffer,1); #else siglongjmp(restart_buffer,1); *** *** 1715,1721 /* if(scoreboard_image-global.please_exit !count_live_servers()) ! #ifdef NEXT longjmp(restart_buffer,1); #else siglongjmp(restart_buffer,1); --- 1715,1721 /* if(scoreboard_image-global.please_exit !count_live_servers()) ! #if defined(NEXT) || defined(USE_LONGJMP) longjmp(restart_buffer,1); #else siglongjmp(restart_buffer,1);
cvs commit: apache/src conf.h http_bprintf.c http_main.c
ben 96/07/16 12:57:29 Modified:src conf.h http_bprintf.c http_main.c Log: Fix long double warning for IRIX. Revision ChangesPath 1.19 +2 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C3 -r1.18 -r1.19 *** conf.h1996/07/09 21:40:13 1.18 --- conf.h1996/07/16 19:57:25 1.19 *** *** 93,99 #define USE_FCNTL_SERIALIZED_ACCEPT #define HAVE_SHMGET #define HAVE_CRYPT_H ! #elif defined(HPUX) #define HAVE_RESOURCE #undef HAVE_GMTOFF --- 93,100 #define USE_FCNTL_SERIALIZED_ACCEPT #define HAVE_SHMGET #define HAVE_CRYPT_H ! #define NO_LONG_DOUBLE ! #elif defined(HPUX) #define HAVE_RESOURCE #undef HAVE_GMTOFF 1.4 +4 -0 apache/src/http_bprintf.c Index: http_bprintf.c === RCS file: /export/home/cvs/apache/src/http_bprintf.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C3 -r1.3 -r1.4 *** http_bprintf.c1996/06/29 20:02:47 1.3 --- http_bprintf.c1996/07/16 19:57:25 1.4 *** *** 29,35 --- 29,39 #define max(a,b)(a b ? a : b) #endif + #ifdef NO_LONG_DOUBLE + #define LONG_DOUBLE double + #else #define LONG_DOUBLE long double + #endif #define FALSE 0 #define TRUE1 1.49 +8 -2 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.48 retrieving revision 1.49 diff -C3 -r1.48 -r1.49 *** http_main.c 1996/07/16 19:39:13 1.48 --- http_main.c 1996/07/16 19:57:26 1.49 *** *** 107,112 --- 107,116 #include prot.h #endif + #include explain.h + + DEF_Explain + /* * Actual definitions of config globals... here because this is * for the most part the only code that acts on 'em. (Hmmm... mod_main.c?) *** *** 839,845 { long int bs=0; time_t now; ! short_score new_score_rec=scoreboard_image[child_num]; if (r-sent_bodyct) bgetopt(r-connection-client, BO_BYTECT, bs); --- 843,849 { long int bs=0; time_t now; ! short_score new_score_rec=scoreboard_image-servers[child_num]; if (r-sent_bodyct) bgetopt(r-connection-client, BO_BYTECT, bs); *** *** 861,867 new_score_rec.how_long = now - new_score_rec.last_used; #if defined(HAVE_MMAP) || defined(HAVE_SHMGET) ! memcpy(scoreboard_image[child_num], new_score_rec, sizeof(short_score)); #else lseek (scoreboard_fd, (long)child_num * sizeof(short_score), 0); force_write (scoreboard_fd, (char*)new_score_rec, sizeof(short_score)); --- 865,871 new_score_rec.how_long = now - new_score_rec.last_used; #if defined(HAVE_MMAP) || defined(HAVE_SHMGET) ! memcpy(scoreboard_image-servers[child_num], new_score_rec, sizeof(short_score)); #else lseek (scoreboard_fd, (long)child_num * sizeof(short_score), 0); force_write (scoreboard_fd, (char*)new_score_rec, sizeof(short_score)); *** *** 1663,1668 --- 1667,1673 /* Child died... note that it's gone in the scoreboard. */ sync_scoreboard_image(); child_slot = find_child_by_pid (pid); + Explain2(Reaping child %d slot %d,pid,child_slot); if (child_slot = 0) (void)update_child_status (child_slot, SERVER_DEAD, (request_rec*)NULL); *** *** 1672,1677 --- 1677,1683 if ((count_idle_servers() daemons_min_free) (child_slot = find_free_child_num()) = 0 child_slot = daemons_limit) { + Explain1(Starting new child in slot %d,child_slot); (void)update_child_status(child_slot,SERVER_STARTING, (request_rec*)NULL); make_child(server_conf, child_slot);
cvs commit: apache/src conf.h http_main.c
jim 96/06/13 13:33:04 Modified:src conf.h http_main.c Log: -Wall warning cleanup Revision ChangesPath 1.13 +3 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C3 -r1.12 -r1.13 *** conf.h1996/06/13 02:11:54 1.12 --- conf.h1996/06/13 20:33:02 1.13 *** *** 229,234 --- 229,237 #undef FLOCK_SERIALIZED_ACCEPT #define HAVE_SHMGET #define MOVEBREAK 0x400 + /* These are to let -Wall compile more cleanly */ + extern int strcasecmp(const char *, const char *); + extern int strncasecmp(const char *,const char *,unsigned); #elif defined(SVR4) #define NO_KILLPG 1.39 +10 -4 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C3 -r1.38 -r1.39 *** http_main.c 1996/06/11 15:40:48 1.38 --- http_main.c 1996/06/13 20:33:02 1.39 *** *** 92,97 --- 92,103 #include sys/types.h #include sys/ipc.h #include sys/shm.h + #if defined(AUX)/* Aren't defined anyplace */ + extern char *shmat(int, char *, int); + extern int shmctl(int, int, struct shmid_ds *); + extern int shmget(key_t, int, int); + extern char *sbrk(int); + #endif #endif #ifdef SecureWare #include sys/security.h *** *** 471,477 char errstr[MAX_STRING_LEN]; struct shmid_ds shmbuf; #ifdef MOVEBREAK ! int obrk; #endif if ((shmid = shmget(shmkey, score_size, IPC_CREAT|SHM_R|SHM_W)) == -1) --- 477,483 char errstr[MAX_STRING_LEN]; struct shmid_ds shmbuf; #ifdef MOVEBREAK ! char *obrk; #endif if ((shmid = shmget(shmkey, score_size, IPC_CREAT|SHM_R|SHM_W)) == -1) *** *** 494,500 * To get around this, we move the break point way up there, * attach the segment and then move break back down. Ugly */ ! if ((obrk=sbrk(MOVEBREAK)) == -1) { perror(sbrk); fprintf(stderr, httpd: Could not move break\n); --- 500,506 * To get around this, we move the break point way up there, * attach the segment and then move break back down. Ugly */ ! if ((obrk=sbrk(MOVEBREAK)) == (char *)-1) { perror(sbrk); fprintf(stderr, httpd: Could not move break\n); *** *** 540,548 exit(1); #ifdef MOVEBREAK ! if (obrk == -1) return; /* nothing else to do */ ! if (sbrk(-(MOVEBREAK)) == -1) { perror(sbrk); fprintf(stderr, httpd: Could not move break back\n); --- 546,554 exit(1); #ifdef MOVEBREAK ! if (obrk == (char *)-1) return; /* nothing else to do */ ! if (sbrk(-(MOVEBREAK)) == (char *)-1) { perror(sbrk); fprintf(stderr, httpd: Could not move break back\n);
cvs commit: apache/src conf.h http_main.c mod_status.c scoreboard.h
jim 96/03/29 07:44:35 Modified:src conf.h http_main.c mod_status.c scoreboard.h Log: add per process counters and PID info to status Revision ChangesPath 1.10 +1 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C3 -r1.9 -r1.10 *** conf.h1996/03/18 01:55:37 1.9 --- conf.h1996/03/29 15:44:31 1.10 *** *** 225,231 #define NEED_STRDUP #define JMP_BUF sigjmp_buf /* fcntl() locking is expensive with NFS */ ! #define FLOCK_SERIALIZED_ACCEPT #define HAVE_SHMGET #define MOVEBREAK 0x400 --- 225,231 #define NEED_STRDUP #define JMP_BUF sigjmp_buf /* fcntl() locking is expensive with NFS */ ! #undef FLOCK_SERIALIZED_ACCEPT #define HAVE_SHMGET #define MOVEBREAK 0x400 1.15 +9 -0 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C3 -r1.14 -r1.15 *** http_main.c 1996/03/29 08:35:46 1.14 --- http_main.c 1996/03/29 15:44:32 1.15 *** *** 665,670 --- 665,677 #if defined(STATUS_INSTRUMENTATION) new_score_rec.last_used=time(NULL); + if (status == SERVER_DEAD) { + /* + * Reset individual counters + */ + new_score_rec.my_access_count = 0; + new_score_rec.my_bytes_served = 0; + } #endif #if defined(HAVE_MMAP) || defined(HAVE_SHMGET) *** *** 702,708 --- 709,717 bgetopt(r-connection-client, BO_BYTECT, bs); new_score_rec.access_count ++; + new_score_rec.my_access_count ++; new_score_rec.bytes_served += (long)bs; + new_score_rec.my_bytes_served += (long)bs; times(new_score_rec.times); 1.6 +11 -2 apache/src/mod_status.c Index: mod_status.c === RCS file: /export/home/cvs/apache/src/mod_status.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C3 -r1.5 -r1.6 *** mod_status.c 1996/03/29 08:56:49 1.5 --- mod_status.c 1996/03/29 15:44:32 1.6 *** *** 138,143 --- 138,144 int busy=0; long count=0; long lres,bytes; + long my_lres,my_bytes; long bcount=0; int short_report=0; server_rec *server = r-server; *** *** 223,232 for (i = 0; iHARD_SERVER_MAX; ++i) { score_record=get_scoreboard_info(i); lres = score_record.access_count; bytes= score_record.bytes_served; if (lres!=0 || (score_record.status != SERVER_READY score_record.status != SERVER_DEAD)) { if (!short_report) { ! sprintf(buffer,brServer %d: %ld [,i,lres); rputs(buffer,r); switch (score_record.status) { --- 224,236 for (i = 0; iHARD_SERVER_MAX; ++i) { score_record=get_scoreboard_info(i); lres = score_record.access_count; + my_lres = score_record.my_access_count; bytes= score_record.bytes_served; + my_bytes= score_record.my_bytes_served; if (lres!=0 || (score_record.status != SERVER_READY score_record.status != SERVER_DEAD)) { if (!short_report) { ! sprintf(buffer,brServer %d (%d): %ld|%ld [, ! i,(int)score_record.pid,my_lres,lres); rputs(buffer,r); switch (score_record.status) { *** *** 242,247 --- 246,254 case SERVER_BUSY_WRITE: rputs(Write,r); break; + case SERVER_DEAD: + rputs(Dead,r); + break; } sprintf(buffer,] u%g s%g cu%g cs%g %s (, score_record.times.tms_utime/tick, *** *** 250,255 --- 257,264 score_record.times.tms_cstime/tick, asctime(localtime(score_record.last_used))); rputs(buffer,r); + format_byte_out(r,my_bytes); + rputs(|,r); format_byte_out(r,bytes); rputs(),r); } *** *** 262,268 } } if (short_report) { ! sprintf(buffer,Accesses: %ld\nBytes: %ld\n,count,bcount); rputs(buffer,r); } else { sprintf(buffer,pTotal accesses: %ld u%g s%g cu%g cs%g (, --- 271,277 } } if