|
|
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 - download
Length: 463 (0x1cf)
Types: TextFile
Names: »contswit.c«
└─⟦db229ac7e⟧ Bits:30007240 EUUGD20: SSBA 1.2 / AFW Benchmarks
└─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21E/bsd/contswit.c«
└─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21F/bsd/contswit.c«
#include "../install/signal.h"
int sigsub();
int otherpid;
int nsigs;
main(argc, argv)
char *argv[];
{
int pid;
if (argc < 2){
printf("usage : %s nsignals \n", argv[0]);
exit(1);
}
nsigs = atoi(argv[1]);
signal(SIGALRM, sigsub);
otherpid = getpid();
pid = fork();
if (pid != 0) {
otherpid = pid;
kill(otherpid, SIGALRM);
}
for (;;)
pause();
}
sigsub()
{
signal(SIGALRM, sigsub);
kill(otherpid, SIGALRM);
if (--nsigs <= 0)
exit(0);
}