[comp.unix.wizards] volatile

edw@IUS1.CS.CMU.EDU (Eddie Wyatt) (04/01/88)

 >>> static void catch(int signo) { gotcha = 1; }
 >>PLEASE, declare the signal handler correctly Mr. Lint :-).
 > 
 >I did.  Note that I was writing a "strictly conforming program".
 > 
 >>static void catch(int signo, code; struct sigcontext *scp) { gotcha = 1; }
 >>
 >>In the pass I've had my signal handle return to random pieces of
 >>code by not having the correct definition.
 > 
 >Yeah, I've also been bitten occasionally by bugs in Berzerkeley code.

  It's questionable whether its a bug or not.  The Sun man page reads:

     The handler routine can be declared:

         handler(sig, code, scp)
         int sig, code;
         struct sigcontext *scp;


  What bothers me about this entry is it doesn't say you have to
declare the function that way.  There's no entry in the BUGS
section eluding to what happen if you don't conform either. 

-- 

Eddie Wyatt 				e-mail: edw@ius1.cs.cmu.edu