summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-12-18 22:11:44 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-12-18 22:11:44 +0000
commit8912b2a077b7b75bd51cc89010a16926b3dd4be0 (patch)
treee5daa9cbe723432ea34f5fc99cea9473058e0671 /bin
parentfbae7873aaba3bccd2740f827f35b547bff4d11c (diff)
Flags set in signal handlers should be volatile sig_atomic_t
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/edit.c4
-rw-r--r--bin/ksh/jobs.c4
-rw-r--r--bin/ksh/sh.h10
3 files changed, 9 insertions, 9 deletions
diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c
index efcc868f638..99f8afd290a 100644
--- a/bin/ksh/edit.c
+++ b/bin/ksh/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.21 2004/12/18 20:58:03 millert Exp $ */
+/* $OpenBSD: edit.c,v 1.22 2004/12/18 22:11:43 millert Exp $ */
/*
* Command line editing - common code
@@ -20,7 +20,7 @@
static void x_sigwinch(int sig);
-static int got_sigwinch;
+static volatile sig_atomic_t got_sigwinch;
static void check_sigwinch(void);
static int x_file_glob(int flags, const char *str, int slen,
diff --git a/bin/ksh/jobs.c b/bin/ksh/jobs.c
index ee76a1c0adc..ea64017be25 100644
--- a/bin/ksh/jobs.c
+++ b/bin/ksh/jobs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: jobs.c,v 1.24 2004/12/18 21:04:52 millert Exp $ */
+/* $OpenBSD: jobs.c,v 1.25 2004/12/18 22:11:43 millert Exp $ */
/*
* Process and job control
@@ -114,7 +114,7 @@ static int child_max; /* CHILD_MAX */
/* held_sigchld is set if sigchld occurs before a job is completely started */
-static int held_sigchld;
+static volatile sig_atomic_t held_sigchld;
#ifdef JOBS
static struct shf *shl_j;
diff --git a/bin/ksh/sh.h b/bin/ksh/sh.h
index 4161a8c0738..fbe09f9e5f7 100644
--- a/bin/ksh/sh.h
+++ b/bin/ksh/sh.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sh.h,v 1.22 2004/12/18 21:58:39 millert Exp $ */
+/* $OpenBSD: sh.h,v 1.23 2004/12/18 22:11:43 millert Exp $ */
/*
* Public Domain Bourne/Korn shell
@@ -256,7 +256,7 @@ typedef struct trap {
const char *name; /* short name */
const char *mess; /* descriptive name */
char *trap; /* trap command */
- int volatile set; /* trap pending */
+ volatile sig_atomic_t set; /* trap pending */
int flags; /* TF_* */
sig_t cursig; /* current handler (valid if TF_ORIG_* set) */
sig_t shtrap; /* shell signal handler */
@@ -287,9 +287,9 @@ typedef struct trap {
#define SIGEXIT_ 0 /* for trap EXIT */
#define SIGERR_ NSIG /* for trap ERR */
-EXTERN int volatile trap; /* traps pending? */
-EXTERN int volatile intrsig; /* pending trap interrupts executing command */
-EXTERN int volatile fatal_trap;/* received a fatal signal */
+EXTERN volatile sig_atomic_t trap; /* traps pending? */
+EXTERN volatile sig_atomic_t intrsig; /* pending trap interrupts command */
+EXTERN volatile sig_atomic_t fatal_trap;/* received a fatal signal */
extern Trap sigtraps[NSIG+1];
/*