--- squid.FCS/src/Makefile.in Wed Oct 4 13:18:03 2000 +++ squid/src/Makefile.in Thu Jan 25 23:08:47 2001 @@ -58,7 +58,7 @@ MALLOCLIB = @LIB_MALLOC@ AC_CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ -XTRA_LIBS = @XTRA_LIBS@ +XTRA_LIBS = @XTRA_LIBS@ -lutil XTRA_OBJS = @XTRA_OBJS@ MV = @MV@ RM = @RM@ --- squid.FCS/src/dnsserver.c Wed Oct 4 13:18:11 2000 +++ squid/src/dnsserver.c Thu Jan 25 23:11:32 2001 @@ -35,6 +35,11 @@ #include "config.h" +#if __bsdi__ +#define HAVE_SETPROCTITLE 1 +void setproctitle(const char *, ...); +#endif + #if HAVE_UNISTD_H #include #endif @@ -258,8 +263,10 @@ { char request[512]; char *t = NULL; - int c; + int c, count = 0; +#ifdef HAVE_RES_INIT int opt_s = 0; +#endif extern char *optarg; safe_inet_addr("255.255.255.255", &no_addr); @@ -333,6 +340,10 @@ } } +#if HAVE_SETPROCTITLE + setproctitle("(%d requests)", count); +#endif + for (;;) { memset(request, '\0', REQ_SZ); if (fgets(request, REQ_SZ, stdin) == NULL) @@ -345,6 +356,10 @@ *t = '\0'; /* strip CR */ lookup(request); fflush(stdout); +#if HAVE_SETPROCTITLE + count++; + setproctitle("(%d requests)", count); +#endif } /* NOTREACHED */ return 0;