--- Makefile +++ Makefile 1994/04/13 18:31:47 @@ -0,0 +1,14 @@ +CFLAGS = -O2 -fomit-frame-pointer -m486 \ + -include /usr/include/bsd/bsd.h -I/usr/include/bsd +LDFLAGS = -s +LDLIBS = -lbsd + +inetd: inetd.o + +install: inetd + install -m744 inetd /usr/sbin/ + install -m644 inetd.8 /usr/man/man8 + +clean: + rm -f *.o inetd + --- inetd.8 +++ inetd.8 1994/04/13 18:31:47 @@ -257,7 +257,7 @@ is reread. .Nm Inetd creates a file -.Em /var/run/inetd.pid +.Em /etc/inetd.pid that contains its process identifier. .Sh SEE ALSO .Xr comsat 8 , --- inetd.c +++ inetd.c 1994/04/13 18:34:49 @@ -120,9 +120,11 @@ #include #include +#ifndef __linux__ #ifndef RLIMIT_NOFILE #define RLIMIT_NOFILE RLIMIT_OFILE #endif +#endif #define RPC @@ -375,12 +377,16 @@ if (debug) fprintf(stderr, "someone wants %s\n", sep->se_service); if (!sep->se_wait && sep->se_socktype == SOCK_STREAM) { + /* Fixed AGC */ + fcntl(sep->se_fd,F_SETFL,O_NDELAY); + /* --------- */ ctrl = accept(sep->se_fd, (struct sockaddr *)0, (int *)0); + fcntl(sep->se_fd,F_SETFL, 0); if (debug) fprintf(stderr, "accept, ctrl %d\n", ctrl); if (ctrl < 0) { - if (errno == EINTR) + if (errno == EINTR || errno == EWOULDBLOCK) continue; syslog(LOG_WARNING, "accept (for %s): %m", sep->se_service); --- pathnames.h +++ pathnames.h 1994/04/13 18:31:47 @@ -37,4 +37,4 @@ #include #define _PATH_INETDCONF "/etc/inetd.conf" -#define _PATH_INETDPID "/var/run/inetd.pid" +#define _PATH_INETDPID "/etc/inetd.pid"