|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T i
Length: 1624 (0x658) Types: TextFile Names: »isore.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/support/isore.c«
/* isore.c - help out ISODE TSAP programs */ #ifndef lint static char *rcsid = "$Header: /f/osi/support/RCS/isore.c,v 6.0 89/03/18 23:44:47 mrose Rel $"; #endif /* * $Header: /f/osi/support/RCS/isore.c,v 6.0 89/03/18 23:44:47 mrose Rel $ * * * $Log: isore.c,v $ * Revision 6.0 89/03/18 23:44:47 mrose * Release 5.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" /* \f 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; } } } /* \f SIGNALS */ /* ARGSUSED */ static SFD EMTser (sig, code, sc) int sig; long code; struct sigcontext *sc; { #ifndef BSDSIGS (void) signal (SIGEMT, EMTser); #endif }