Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!emx.utexas.edu!hod From: hod@star2.cm.utexas.edu (Hod Greeley) Newsgroups: comp.unix.wizards Subject: system hangs Message-ID: Date: 5 Jul 90 20:50:40 GMT Sender: news@ut-emx.UUCP Distribution: comp.unix.wizards Organization: ThinMan, Inc Lines: 45 We have a problem running the following code on our system, a stellar GS2000 running unix system V with BSD extensions. The code prints the message and exits, seemingly properly, but then the system hangs. Am I doing something stupid? Even if I am, should it have this drastic an effect? Here's the code: #include #include #include #define UPDATE 200000 SetTimer() { struct itimerval udt; udt.it_interval.tv_sec = 0L; udt.it_interval.tv_usec = UPDATE; udt.it_value.tv_sec = 0L; udt.it_value.tv_usec = UPDATE; setitimer(ITIMER_REAL, &udt, 0); } main() { void msg(); signal(SIGALRM, msg); SetTimer(); for (;;) {} } void msg() { puts("signal alarm received."); exit(); } color me confused. Hod Greeley hod@star2.cm.utexas.edu