summaryrefslogtreecommitdiff
path: root/libexec/comsat
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2007-05-03 15:09:41 +0000
committerchristos <christos@NetBSD.org>2007-05-03 15:09:41 +0000
commit8cb0a31f672ce7de68096e3b3ee6953fed5d91a4 (patch)
treeecc8e0ffb0594be965298fd31e4c63673c5401c9 /libexec/comsat
parente8d4c9a1537b54c8bfbeabf9d1d624cc7e3f3aa1 (diff)
PR/36266: David A. Holland: Don't read and write sig_atomic_t variables in
signal handlers; only write them.
Diffstat (limited to 'libexec/comsat')
-rw-r--r--libexec/comsat/comsat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c
index 7acbb6d1266..07e795f73c0 100644
--- a/libexec/comsat/comsat.c
+++ b/libexec/comsat/comsat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: comsat.c,v 1.35 2007/02/21 21:06:26 hubertf Exp $ */
+/* $NetBSD: comsat.c,v 1.36 2007/05/03 15:09:41 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "from: @(#)comsat.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: comsat.c,v 1.35 2007/02/21 21:06:26 hubertf Exp $");
+__RCSID("$NetBSD: comsat.c,v 1.36 2007/05/03 15:09:41 christos Exp $");
#endif
#endif /* not lint */
@@ -136,7 +136,7 @@ main(int argc, char *argv[])
syslog(LOG_ERR, "sigprocmask get failed (%m)");
exit(1);
}
- needupdate++;
+ needupdate = 1;
for (;;) {
cc = recv(0, msgbuf, sizeof(msgbuf) - 1, 0);
if (cc <= 0) {
@@ -167,7 +167,7 @@ static void
/*ARGSUSED*/
onalrm(int signo)
{
- needupdate++;
+ needupdate = 1;
}
static void