Dorrie Hall (dorrie++at++iris.mit.edu)
Tue, 2 Feb 1999 17:05:41 -0500 (EST)
jason bryan
ohio supercomputer center
Hi,
This is an ancient snippet of code and I can't remember
enough about it to offer any explanation. Maybe you can make
some sense of it. -Dorrie
#include <signal.h>
void mytrap(...);
.
.
.
.
pfInit();
/* if someone quits with ctrl c, clean up pf stuff in /usr/tmp */
/* needs to be after pfInit */
/* usually ctrl \ on sgi, by default dumps core*/
signal(SIGQUIT,mytrap);
/* usually ctrl c on sgi */
signal(SIGINT,mytrap);
void mytrap(...){
/* try not to dump pfUtil file in /usr/tmp */
/* by dropping through SimDone and doing pfExit*/
/* pfExit needs to be called by parent process */
/* can't seem to ctrl C gracefully before sim loop */
pfuExitUtil();
pfuExitInput();
pfExit();
exit(0);
return(0);
printf("CHECK for core\n");
exitFlag = 1;
}
In main loop check exit flag
if exitFlag
pfuFreeCPUs();
pfuExitUtil();
pfuExitInput();
pfExit();
exit(0);
return(0);
-- Dorrie Hall email:dorrie++at++mit.edu voice:(617)253-7841 FAX:(617)258-9535 MIT, N42-140 77 Massachusetts Avenue Cambridge, MA 02139-4307
This archive was generated by hypermail 2.0b2 on Tue Feb 02 1999 - 14:05:19 PST