Need help with SIGALRM/ualarm

Ronald S. Woan ron at woan
Wed Oct 24 04:50:37 AEST 1990


In article <13211 at ogicse.ogi.edu>, pturner at ese.ese.ogi.edu (Paul
Turner) writes:
Paul> I'm trying to do some animation on an RS6000 (a 320 w
Paul> AIX 3.1 plus the 3001 update) and I'm having problems
Paul> with the alarm call. The following code fragment performs
Paul> exactly as I expected on a Sun w SunOS 4.0 but fails on the
Paul> RS6000 with a single call to the alarm signal handler followed
Paul> by the termination of the program.

Isn't this just the difference between System V (also pre 4.2 BSD) and
BSD 4.2/4.3 signals, i.e.  you need to reset the signal by hand in the
signal handler, i.e.:

void animate()
{
    signal(SIGALRM, SIG_IGN);
    printf("Called\n");
    signal(SIGALRM, animate);
}

+-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+
+------------------------------My Employer----------------------------------+
+ Ronald S. Woan       woan at peyote.cactus.org or woan%austin at iinus1.ibm.com +
+ other email addresses             Prodigy: XTCR74A Compuserve: 73530,2537 +



More information about the Comp.unix.aix mailing list