Messages in this thread | | | Date | Mon, 9 Aug 1999 03:03:38 +0200 | From | Kurt Garloff <> | Subject | Re: Q: Signal processing |
| |
On Sat, Aug 07, 1999 at 08:53:16PM -0400, Richard B. Johnson wrote: > Sure: > > int sig_caugth; > > void sig_handler(int sig) > { > sig_caught = sig; > } > > prog() > { > sig_caugth = NOTHING; > .....; /* set up signal handler */ > .....; > pause(); /* Wait for a signal */ > /* Control returns here soon after your sig_hangler() returns */ > > switch(sig_caught) > { > .....; > } > }
You missed a volatile!
-- Kurt Garloff <garloff@suse.de> Wuppertal, FRG PGP2 key: See mail header, key servers Linux kernel development SuSE GmbH, Nürnberg, FRG SCSI drivers: tmscsim(DC390), DC395 [unhandled content-type:application/pgp-signature] | |