aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-05 14:14:55 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-05 14:14:55 +0000
commitc06e80e1e7fed5ee9d74201180e8d0d4cee625c0 (patch)
tree024e0d4f39af3bfe82534d598b6524230964a774
parentf382c0236e986c4982da3ff2a85f446395f9ff06 (diff)
downloadbusybox-w32-c06e80e1e7fed5ee9d74201180e8d0d4cee625c0.tar.gz
busybox-w32-c06e80e1e7fed5ee9d74201180e8d0d4cee625c0.tar.bz2
busybox-w32-c06e80e1e7fed5ee9d74201180e8d0d4cee625c0.zip
more lost changes BSD signals -> SysV signals. Noticed by Bernhard
-rw-r--r--networking/inetd.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/networking/inetd.c b/networking/inetd.c
index 0924c5bbc..5abf27219 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -177,8 +177,6 @@
177#define CNT_INTVL 60 /* servers in CNT_INTVL sec. */ 177#define CNT_INTVL 60 /* servers in CNT_INTVL sec. */
178#define RETRYTIME (60*10) /* retry after bind or server fail */ 178#define RETRYTIME (60*10) /* retry after bind or server fail */
179 179
180#define SIGBLOCK (sigmask(SIGCHLD)|sigmask(SIGHUP)|sigmask(SIGALRM))
181
182#ifndef RLIMIT_NOFILE 180#ifndef RLIMIT_NOFILE
183#define RLIMIT_NOFILE RLIMIT_OFILE 181#define RLIMIT_NOFILE RLIMIT_OFILE
184#endif 182#endif
@@ -1276,6 +1274,7 @@ inetd_main (int argc, char *argv[])
1276 pid_t pid; 1274 pid_t pid;
1277 char buf[50]; 1275 char buf[50];
1278 char *stoomany; 1276 char *stoomany;
1277 sigset_t omask;
1279 1278
1280#ifdef INETD_SETPROCTITLE 1279#ifdef INETD_SETPROCTITLE
1281 extern char **environ; 1280 extern char **environ;
@@ -1383,10 +1382,10 @@ inetd_main (int argc, char *argv[])
1383 fd_set readable; 1382 fd_set readable;
1384 1383
1385 if (nsock == 0) { 1384 if (nsock == 0) {
1386 (void) sigblock (SIGBLOCK); 1385 Block_Using_Signals(omask);
1387 while (nsock == 0) 1386 while (nsock == 0)
1388 sigpause (0L); 1387 sigpause (0L);
1389 (void) sigsetmask (0L); 1388 sigprocmask(SIG_UNBLOCK, &omask, NULL);
1390 } 1389 }
1391 1390
1392 readable = allsock; 1391 readable = allsock;
@@ -1425,7 +1424,7 @@ inetd_main (int argc, char *argv[])
1425 } 1424 }
1426 } else 1425 } else
1427 ctrl = sep->se_fd; 1426 ctrl = sep->se_fd;
1428 (void) sigblock (SIGBLOCK); 1427 Block_Using_Signals(omask);
1429 pid = 0; 1428 pid = 0;
1430#ifdef INETD_FEATURE_ENABLED 1429#ifdef INETD_FEATURE_ENABLED
1431 if (sep->se_bi == 0 || sep->se_bi->bi_fork) 1430 if (sep->se_bi == 0 || sep->se_bi->bi_fork)
@@ -1463,7 +1462,7 @@ inetd_main (int argc, char *argv[])
1463 sep->se_fd = -1; 1462 sep->se_fd = -1;
1464 sep->se_count = 0; 1463 sep->se_count = 0;
1465 nsock--; 1464 nsock--;
1466 sigsetmask (0L); 1465 sigprocmask(SIG_UNBLOCK, &omask, NULL);
1467 if (!timingout) { 1466 if (!timingout) {
1468 timingout = 1; 1467 timingout = 1;
1469 alarm (RETRYTIME); 1468 alarm (RETRYTIME);
@@ -1477,7 +1476,7 @@ inetd_main (int argc, char *argv[])
1477 syslog (LOG_ERR, "fork: %m"); 1476 syslog (LOG_ERR, "fork: %m");
1478 if (!sep->se_wait && sep->se_socktype == SOCK_STREAM) 1477 if (!sep->se_wait && sep->se_socktype == SOCK_STREAM)
1479 close (ctrl); 1478 close (ctrl);
1480 sigsetmask (0L); 1479 sigprocmask(SIG_UNBLOCK, &omask, NULL);
1481 sleep (1); 1480 sleep (1);
1482 continue; 1481 continue;
1483 } 1482 }
@@ -1486,7 +1485,7 @@ inetd_main (int argc, char *argv[])
1486 FD_CLR (sep->se_fd, &allsock); 1485 FD_CLR (sep->se_fd, &allsock);
1487 nsock--; 1486 nsock--;
1488 } 1487 }
1489 sigsetmask (0L); 1488 sigprocmask(SIG_UNBLOCK, &omask, NULL);
1490 if (pid == 0) { 1489 if (pid == 0) {
1491#ifdef INETD_FEATURE_ENABLED 1490#ifdef INETD_FEATURE_ENABLED
1492 if (sep->se_bi) { 1491 if (sep->se_bi) {