stream servers are always nowait. It refuses to believe in a `wait' stream
server. Removing these tests allows wait/nowait to work for stream servers
too. -- from Chris Torek.
SCCS-vsn: usr.sbin/inetd/inetd.c 5.24
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)inetd.c 5.23 (Berkeley) %G%";
+static char sccsid[] = "@(#)inetd.c 5.24 (Berkeley) %G%";
n--;
if (debug)
fprintf(stderr, "someone wants %s\n", sep->se_service);
n--;
if (debug)
fprintf(stderr, "someone wants %s\n", sep->se_service);
- if (!sep->se_wait && sep->se_socktype == SOCK_STREAM) {
+ if (sep->se_socktype == SOCK_STREAM) {
ctrl = accept(sep->se_fd, (struct sockaddr *)0,
(int *)0);
if (debug)
ctrl = accept(sep->se_fd, (struct sockaddr *)0,
(int *)0);
if (debug)
if (ctrl < 0) {
if (errno == EINTR)
continue;
if (ctrl < 0) {
if (errno == EINTR)
continue;
- syslog(LOG_WARNING, "accept: %m");
+ syslog(LOG_WARNING, "accept (for %s): %m",
+ sep->se_service);
pid = fork();
}
if (pid < 0) {
pid = fork();
}
if (pid < 0) {
- if (!sep->se_wait && sep->se_socktype == SOCK_STREAM)
+ if (sep->se_socktype == SOCK_STREAM)
close(ctrl);
sigsetmask(0L);
sleep(1);
close(ctrl);
sigsetmask(0L);
sleep(1);
- if (!sep->se_wait && sep->se_socktype == SOCK_STREAM)
+ if (sep->se_socktype == SOCK_STREAM)