|
|
BSD 4.3reno
/* isore.c - help out ISODE TSAP programs */
#ifndef lint
static char *rcsid = "$Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/support/isore.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $";
#endif
/*
* $Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/support/isore.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
*
*
* $Log: isore.c,v $
* Revision 1.1.1.1 2018/04/24 16:12:56 root
* BSD 4.3reno
*
* Revision 7.0 89/11/23 22:27:34 mrose
* Release 6.0
*
*/
/*
* NOTICE
*
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
* this agreement.
*
*/
#include <stdio.h>
#include <signal.h>
#include "manifest.h"
/* MAIN */
SFD EMTser ();
/* ARGSUSED */
main (argc, argv, envp)
int argc;
char **argv,
**envp;
{
int fd,
mask,
nfds,
ppid;
fd_set ifds,
rfds;
if (argc != 4)
exit (1);
if ((nfds = atoi (argv[1])) < 0
|| sscanf (argv[2], "0x%x", &mask) != 1
|| (ppid = atoi (argv[3])) < 0)
exit (2);
FD_ZERO (&rfds);
for (fd = 0; fd < nfds; fd++)
if (mask & (1 << fd))
FD_SET (fd, &rfds);
(void) signal (SIGEMT, EMTser);
for (;;) {
ifds = rfds;
switch (xselect (nfds, &ifds, NULLFD, NULLFD, NOTOK)) {
case NOTOK:
fprintf (stderr, "NOTOK\n");
break;
case OK:
fprintf (stderr, "OK\n");
break;
default:
(void) kill (ppid, SIGEMT);
sigpause (0);
break;
}
}
}
/* SIGNALS */
/* ARGSUSED */
static SFD EMTser (sig, code, sc)
int sig;
long code;
struct sigcontext *sc;
{
#ifndef BSDSIGS
(void) signal (SIGEMT, EMTser);
#endif
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.