From: Joseph H Allen (jhallen@world.std.com)
Date: 02/07/93


From: jhallen@world.std.com (Joseph H Allen)
Subject: Re: signal(SIGALRM, handler) ???
Date: Sun, 7 Feb 1993 22:13:49 GMT

In article <1993Feb2.210839.23785@ccds3.ntu.edu.tw> dhliu@solar.csie.ntu.edu.tw (Der-Hua Liu) writes:
>Here is my alarm test program:

>This program prints
> A B C D ...... on SunOS 4.1.1
>
>However, on the Linux, this prog just prints A and exits. (SIGALRM received)
>'signal(SIGALRM, time_int)' must be inserted before alarm again in time_int.
>
>Which one is right ? I personally think SunOS's alarm is better.

The Linux way, since it will work on both SunOS and linux. (I think SunOS
made an extension with this, the Linux behaviour is more traditional).

-- 
/*  jhallen@world.std.com (192.74.137.5) */               /* Joseph H. Allen */
int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0)
+r*57)/7,q=q?q-1?q-2?1-p%79?-1:0:p%79-77?1:0:p<1659?79:0:p>158?-79:0,q?!a[p+q*2
]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}