Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site sol.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!ittatc!sii!dmcnh!sol!chris From: chris@sol.UUCP (Christopher Caldwell) Newsgroups: net.unix-wizards Subject: ULTRIX-11 V2.0 signal problem Message-ID: <115@sol.UUCP> Date: Fri, 7-Feb-86 14:55:31 EST Article-I.D.: sol.115 Posted: Fri Feb 7 14:55:31 1986 Date-Received: Wed, 12-Feb-86 21:19:28 EST Distribution: net Organization: VIBRAC Corp., Amherst, NH Lines: 127 (Beware: This uses the DEC system call "sigsys(2)" (embedded in the DEC routines "sigset(3)". This mechanism is meant to correct for early UNIX signal difficulties. I assume that persons not familiar with ULTRIX-11 and signalling mechanisms will probably not want to read any further.) We are running ULTRIX-11, V2.0 on a PDP-11/73 system with a meg of memory. The following C program acts as a random number generator: ========================================================================= #include #include long intcounter; interupt() { intcounter++; } main(argc,argv) int argc; char *argv[]; { int i; int parentpid; int numproc, numsig; parentpid = getpid(); if( (argc!=3) || (sscanf(argv[1],"%d",&numproc)!=1) || (numproc<1) || (numproc>10) || (sscanf(argv[2],"%d",&numsig)!=1) || (numsig<1) || (numsig>100) ) { fprintf(stderr,"Usage: %s num_processes num_signals_perprocess\n", argv[0]); exit(0); } intcounter=0L; sigset( SIGHUP, interupt ); for( i=0; i