change osbolete sigpause() to sigsuspend()
This commit is contained in:
parent
6f03722448
commit
ecfd1f6a35
@ -1273,7 +1273,7 @@ inetd_main (int argc, char *argv[])
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
char buf[50];
|
char buf[50];
|
||||||
char *stoomany;
|
char *stoomany;
|
||||||
sigset_t omask;
|
sigset_t omask, wait_mask;
|
||||||
|
|
||||||
#ifdef INETD_SETPROCTITLE
|
#ifdef INETD_SETPROCTITLE
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
@ -1364,7 +1364,7 @@ inetd_main (int argc, char *argv[])
|
|||||||
sigaction (SIGINT, &sa, NULL);
|
sigaction (SIGINT, &sa, NULL);
|
||||||
sa.sa_handler = SIG_IGN;
|
sa.sa_handler = SIG_IGN;
|
||||||
sigaction (SIGPIPE, &sa, &sapipe);
|
sigaction (SIGPIPE, &sa, &sapipe);
|
||||||
|
memset(&wait_mask, 0, sizeof(wait_mask));
|
||||||
{
|
{
|
||||||
/* space for daemons to overwrite environment for ps */
|
/* space for daemons to overwrite environment for ps */
|
||||||
#define DUMMYSIZE 100
|
#define DUMMYSIZE 100
|
||||||
@ -1383,7 +1383,7 @@ inetd_main (int argc, char *argv[])
|
|||||||
if (nsock == 0) {
|
if (nsock == 0) {
|
||||||
Block_Using_Signals(omask);
|
Block_Using_Signals(omask);
|
||||||
while (nsock == 0)
|
while (nsock == 0)
|
||||||
sigpause (0L);
|
sigsuspend (&wait_mask);
|
||||||
sigprocmask(SIG_UNBLOCK, &omask, NULL);
|
sigprocmask(SIG_UNBLOCK, &omask, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user