diff options
author | Hans Insulander <hin@cvs.openbsd.org> | 2002-03-25 10:52:33 +0000 |
---|---|---|
committer | Hans Insulander <hin@cvs.openbsd.org> | 2002-03-25 10:52:33 +0000 |
commit | f8f7416f292483435c9c89e58d47df145bbb7728 (patch) | |
tree | 90b26cb9cd99eb4f20af89f511d6036e3670c278 /usr.bin/telnet/externs.h | |
parent | 573269ef0f76282c210c809b1e36479e5d1aa9d3 (diff) |
Todd Miller pointed this out to me:
You really want to use 'volatile sig_atomic_t' not just sig_atomic_t
for flags set in signal handlers. Without the volatile gcc may
stick the value in a register but update the on-stack copy in the
signal handler.
Diffstat (limited to 'usr.bin/telnet/externs.h')
-rw-r--r-- | usr.bin/telnet/externs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/telnet/externs.h b/usr.bin/telnet/externs.h index a6e2bab6f4c..a4ada49930b 100644 --- a/usr.bin/telnet/externs.h +++ b/usr.bin/telnet/externs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: externs.h,v 1.9 2002/03/22 13:49:28 hin Exp $ */ +/* $OpenBSD: externs.h,v 1.10 2002/03/25 10:52:32 hin Exp $ */ /* $KTH: externs.h,v 1.16 1997/11/29 02:28:35 joda Exp $ */ /* @@ -88,7 +88,7 @@ extern int termdata, /* Print out terminal data flow */ debug; /* Debug level */ -extern sig_atomic_t intr_happened, intr_waiting; /* for interrupt handling */ +extern volatile sig_atomic_t intr_happened, intr_waiting; /* for interrupt handling */ extern cc_t escape; /* Escape to command mode */ extern cc_t rlogin; /* Rlogin mode escape character */ |