On Sat, Aug 07, 1999 at 08:53:16PM -0400, Richard B. Johnson wrote:
> Sure:
>=20
> int sig_caugth;
>=20
> void sig_handler(int sig)
> {
> sig_caught =3D sig;
> }
>=20
> prog()
> {
> sig_caugth =3D NOTHING;
> .....; /* set up signal handler */
> .....;
> pause(); /* Wait for a signal */
> /* Control returns here soon after your sig_hangler() returns */
>=20
> switch(sig_caught)
> {
> .....;
> }
> }
You missed a volatile!
--=20
Kurt Garloff <garloff@suse.de> Wuppertal, FRG
PGP2 key: See mail header, key servers Linux kernel development
SuSE GmbH, N=FCrnberg, FRG SCSI drivers: tmscsim(DC390), DC395
--DSayHWYpDlRfCAAQ
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
iQCUAwUBN64o6haQN/7O/JIVAQH3rwP4+jp2d1rEs2TzS088hfr/Gt62IcmxW+BG
r2+MXEDJE1uJxE4DPuOLGCBQPwgSI6kerdmYI9TkePj5uwRQWpL0rp2jQcgwwaJ4
/FLqK8gPsPOGlLIN31NRTe5DOGyqyVpUvtbuOSBSvURyFBaxlGdq1HjQZ4L3JuFI
a6lssBjJPw==
=UwBK
-----END PGP SIGNATURE-----
--DSayHWYpDlRfCAAQ--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/