From f8f7416f292483435c9c89e58d47df145bbb7728 Mon Sep 17 00:00:00 2001 From: Hans Insulander Date: Mon, 25 Mar 2002 10:52:33 +0000 Subject: 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. --- usr.bin/telnet/externs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/telnet/externs.h') 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 */ -- cgit v1.2.3