cvs commit: apache/src/regex .cvsignore
ben 96/07/27 05:36:50 Modified:src/regex .cvsignore Log: Ignore executable re produced during make. Revision ChangesPath 1.2 +2 -0 apache/src/regex/.cvsignore Index: .cvsignore === RCS file: /export/home/cvs/apache/src/regex/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C3 -r1.1 -r1.2 *** .cvsignore1996/07/24 19:08:41 1.1 --- .cvsignore1996/07/27 12:36:49 1.2 *** *** 1 --- 1,3 *.ih + re +
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; ! }
cvs commit: apache/src http_core.c
ben 96/07/27 06:25:06 Modified:src http_core.c Log: Makes setrlimit stuff burn less memory, and also tidies it up some more. Revision ChangesPath 1.22 +23 -19apache/src/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C3 -r1.21 -r1.22 *** http_core.c 1996/07/27 13:08:29 1.21 --- http_core.c 1996/07/27 13:25:05 1.22 *** *** 95,118 conf-do_rfc1413 = DEFAULT_RFC1413 | 2; /* set bit 1 to indicate default */ #ifdef RLIMIT_CPU ! conf-limit_cpu = (struct rlimit *) pcalloc (a, sizeof (struct rlimit)); ! if ((getrlimit(RLIMIT_CPU, conf-limit_cpu)) != 0) ! conf-limit_cpu = NULL; #endif ! #ifdef RLIMIT_DATA ! conf-limit_mem = (struct rlimit *) pcalloc (a, sizeof (struct rlimit)); ! if ((getrlimit(RLIMIT_DATA, conf-limit_mem)) != 0) ! conf-limit_mem = NULL; ! #endif ! #ifdef RLIMIT_VMEM ! conf-limit_mem = (struct rlimit *) pcalloc (a, sizeof (struct rlimit)); ! if ((getrlimit(RLIMIT_VMEM, conf-limit_mem)) != 0) ! conf-limit_mem = NULL; #endif #ifdef RLIMIT_NPROC ! conf-limit_nproc = (struct rlimit *) pcalloc (a, sizeof (struct rlimit)); ! if ((getrlimit(RLIMIT_NPROC, conf-limit_nproc)) != 0) ! conf-limit_nproc = NULL; #endif conf-sec = make_array (a, 2, sizeof(void *)); --- 95,107 conf-do_rfc1413 = DEFAULT_RFC1413 | 2; /* set bit 1 to indicate default */ #ifdef RLIMIT_CPU ! conf-limit_cpu = NULL; #endif ! #if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) ! conf-limit_mem = NULL; #endif #ifdef RLIMIT_NPROC ! conf-limit_nproc = NULL; #endif conf-sec = make_array (a, 2, sizeof(void *)); *** *** 839,851 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; --- 828,851 return NULL; } ! static void set_rlimit(cmd_parms *cmd, struct rlimit **plimit, char *arg, !int type) { char *str; + struct rlimit *limit; /* If your platform doesn't define rlim_t then typedef it in conf.h */ rlim_t cur = 0; rlim_t max = 0; + *plimit=(struct rlimit *)pcalloc(cmd-pool,sizeof **plimit); + limit=*plimit; + if ((getrlimit(type, limit)) != 0) + { + *plimit = NULL; + log_unixerr(getrlimit,cmd-cmd-name,failed,cmd-server); + return; + } + if ((str = getword_conf(cmd-pool, arg))) if (!strcasecmp(str, max)) cur = limit-rlim_max; *** *** 884,890 #ifdef RLIMIT_CPU char *set_limit_cpu (cmd_parms *cmd, core_dir_config *conf, char *arg) { ! set_rlimit(cmd,conf-limit_cpu,arg); return NULL; } #endif --- 884,890 #ifdef RLIMIT_CPU char *set_limit_cpu (cmd_parms *cmd, core_dir_config *conf, char *arg) { ! set_rlimit(cmd,conf-limit_cpu,arg,RLIMIT_CPU); return NULL; } #endif *** *** 892,898 #if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) char *set_limit_mem (cmd_parms *cmd, core_dir_config *conf, char *arg) { ! set_rlimit(cmd,conf-limit_mem,arg); return NULL; } #endif --- 892,902 #if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) char *set_limit_mem (cmd_parms *cmd, core_dir_config *conf, char *arg) { ! #ifdef RLIMIT_DATA ! set_rlimit(cmd,conf-limit_mem,arg,RLIMIT_DATA); ! #else ! set_rlimit(cmd,conf-limit_mem,arg,RLIMIT_VMEM); ! #endif return NULL; } #endif *** *** 900,906 #ifdef RLIMIT_NPROC char *set_limit_nproc (cmd_parms *cmd, core_dir_config *conf, char *arg) { ! set_rlimit(cmd,conf-limit_nproc,arg); return NULL; } #endif --- 904,910 #ifdef RLIMIT_NPROC char *set_limit_nproc (cmd_parms *cmd, core_dir_config *conf, char *arg) { ! set_rlimit(cmd,conf-limit_nproc,arg,RLIMIT_NPROC); return NULL; } #endif
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 },
cvs commit: apache/src http_config.c
randy 96/07/27 09:59:44 Modified:src http_config.c Log: Initialize server_rec-error_log to STDERR_FILENO so we can safely use the system log routines before the configured error logs are open. Revision ChangesPath 1.16 +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.15 retrieving revision 1.16 diff -C3 -r1.15 -r1.16 *** http_config.c 1996/07/27 13:08:28 1.15 --- http_config.c 1996/07/27 16:59:43 1.16 *** *** 782,787 --- 782,788 s-server_admin = DEFAULT_ADMIN; s-server_hostname = NULL; s-error_fname = DEFAULT_ERRORLOG; + s-error_log = fdopen(STDERR_FILENO, w); s-srm_confname = RESOURCE_CONFIG_FILE; s-access_confname = ACCESS_CONFIG_FILE; s-timeout = DEFAULT_TIMEOUT;
cvs commit: apache/src http_config.c
ben 96/07/27 10:18:26 Modified:src http_config.c Log: Use stderr instead of creating a new FILE *, mainly to avoid bugs on some OSes, but also because it is cleaner. Revision ChangesPath 1.17 +1 -1 apache/src/http_config.c Index: http_config.c === RCS file: /export/home/cvs/apache/src/http_config.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C3 -r1.16 -r1.17 *** http_config.c 1996/07/27 16:59:43 1.16 --- http_config.c 1996/07/27 17:18:25 1.17 *** *** 782,788 s-server_admin = DEFAULT_ADMIN; s-server_hostname = NULL; s-error_fname = DEFAULT_ERRORLOG; ! s-error_log = fdopen(STDERR_FILENO, w); s-srm_confname = RESOURCE_CONFIG_FILE; s-access_confname = ACCESS_CONFIG_FILE; s-timeout = DEFAULT_TIMEOUT; --- 782,788 s-server_admin = DEFAULT_ADMIN; s-server_hostname = NULL; s-error_fname = DEFAULT_ERRORLOG; ! s-error_log = stderr; s-srm_confname = RESOURCE_CONFIG_FILE; s-access_confname = ACCESS_CONFIG_FILE; s-timeout = DEFAULT_TIMEOUT;
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 http_core.c
jim 96/07/27 16:00:09 Modified:src http_core.c Log: Work around systems without RLIMIT family Revision ChangesPath 1.24 +2 -0 apache/src/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C3 -r1.23 -r1.24 *** http_core.c 1996/07/27 16:21:17 1.23 --- http_core.c 1996/07/27 23:00:06 1.24 *** *** 828,833 --- 828,834 return NULL; } + #if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC) static void set_rlimit(cmd_parms *cmd, struct rlimit **plimit, char *arg, int type) { *** *** 873,878 --- 874,880 limit-rlim_max = max; } } + #endif static char *no_set_limit (cmd_parms *cmd, core_dir_config *conf, char *arg) {
cvs commit: apache/src Makefile.tmpl
jim 96/07/27 16:00:50 Modified:src Makefile.tmpl Log: Propagate compiler flags to regex Revision ChangesPath 1.16 +1 -1 apache/src/Makefile.tmpl Index: Makefile.tmpl === RCS file: /export/home/cvs/apache/src/Makefile.tmpl,v retrieving revision 1.15 retrieving revision 1.16 diff -C3 -r1.15 -r1.16 *** Makefile.tmpl 1996/07/23 22:06:38 1.15 --- Makefile.tmpl 1996/07/27 23:00:49 1.16 *** *** 25,31 $(CC) $(LFLAGS) $(AUX_LFLAGS) -o httpd $(OBJS) $(LIBS) $(EXTRA_LIBS) $(AUX_LIBS) regex/libregex.a: ! cd regex; make lib CC=$(CC) clean: rm -f httpd $(OBJS) *pure* --- 25,31 $(CC) $(LFLAGS) $(AUX_LFLAGS) -o httpd $(OBJS) $(LIBS) $(EXTRA_LIBS) $(AUX_LIBS) regex/libregex.a: ! cd regex; make lib CC=$(CC) CFLAGS=$(CFLAGS) $(AUX_CFLAGS) -I. -DPOSIX_MISTAKE clean: rm -f httpd $(OBJS) *pure*
cvs commit: apache/src http_main.c
akosut 96/07/27 17:03:17 Modified:src http_main.c Log: Fix compiler warning on HP-UX Revision ChangesPath 1.56 +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.55 retrieving revision 1.56 diff -C3 -r1.55 -r1.56 *** http_main.c 1996/07/27 04:09:03 1.55 --- http_main.c 1996/07/28 00:03:15 1.56 *** *** 309,315 --- 309,320 * slurp up any data that arrives... */ + #ifdef HPUX + while ((select_rv = select (sd + 1, (int*)fds_read, NULL, (int*)fds_err, + tv)) 0) { + #else while ((select_rv = select (sd + 1, fds_read, NULL, fds_err, tv)) 0) { + #endif if ((read_rv = read (sd, dummybuf, sizeof(dummybuf))) = 0) break; else { *** *** 1393,1399 --- 1398,1408 FD_SET(sd,fds); do + #ifdef HPUX + csd = select(sd+1, (int*)fds, NULL, NULL, NULL); + #else csd = select(sd+1, fds, NULL, NULL, NULL); + #endif while(csd 0 errno == EINTR); if(csd 0)