From: cheloha Date: Sat, 10 Sep 2022 00:49:47 +0000 (+0000) Subject: init(8): fix signal handler boolean type and qualifier X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bdce9d03b49cd9b7a0daee512f5ee29e4e23a121;p=openbsd init(8): fix signal handler boolean type and qualifier The variable "clang" is modified from a signal handler. Change it from an 'int' to a 'sig_atomic_t' and mark it 'volatile', as we recommend in signal(3). ok millert@ kn@ --- diff --git a/sbin/init/init.c b/sbin/init/init.c index 9d9b599589d..cf7ed60afe9 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.71 2021/10/24 21:24:21 deraadt Exp $ */ +/* $OpenBSD: init.c,v 1.72 2022/09/10 00:49:47 cheloha Exp $ */ /* $NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $ */ /*- @@ -176,7 +176,8 @@ void setsecuritylevel(int); void setprocresources(char *); int getsecuritylevel(void); int setupargv(session_t *, struct ttyent *); -int clang; + +volatile sig_atomic_t clang; void clear_session_logs(session_t *);