|
|
1.1 ! root 1: #include "mk.h" ! 2: #include <signal.h> ! 3: ! 4: static ! 5: sigint() ! 6: { ! 7: extern errno; ! 8: ! 9: signal(SIGINT, SIG_IGN); ! 10: kflag = 1; /* to make sure waitup doesn't exit */ ! 11: jobs = 0; /* make sure no more get scheduled */ ! 12: while(waitup(1, (int *)0) == 0) ! 13: ; ! 14: Fprint(1, "mk: interrupted!\n"); ! 15: Exit(); ! 16: } ! 17: ! 18: sigcatch() ! 19: { ! 20: if(signal(SIGINT, SIG_IGN) != SIG_IGN) ! 21: signal(SIGINT, sigint); ! 22: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.