Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/nvi/dist/cl When testing to see if a signal han...
details: https://anonhg.NetBSD.org/src/rev/967751103d02
branches: trunk
changeset: 357982:967751103d02
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Dec 06 17:16:14 2017 +0000
description:
When testing to see if a signal handler was previously installed in
h_winch, test sa_handler against all SIG_* actions defined in sys/signal.h
instead of just 0. Corrects an issue where vi crashes after a window is
resized.
diffstat:
external/bsd/nvi/dist/cl/cl_main.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 792ec6a976a4 -r 967751103d02 external/bsd/nvi/dist/cl/cl_main.c
--- a/external/bsd/nvi/dist/cl/cl_main.c Wed Dec 06 16:38:22 2017 +0000
+++ b/external/bsd/nvi/dist/cl/cl_main.c Wed Dec 06 17:16:14 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cl_main.c,v 1.8 2017/11/06 03:27:34 rin Exp $ */
+/* $NetBSD: cl_main.c,v 1.9 2017/12/06 17:16:14 jmcneill Exp $ */
/*-
* Copyright (c) 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -16,7 +16,7 @@
static const char sccsid[] = "Id: cl_main.c,v 10.54 2001/07/29 19:07:27 skimo Exp (Berkeley) Date: 2001/07/29 19:07:27 ";
#endif /* not lint */
#else
-__RCSID("$NetBSD: cl_main.c,v 1.8 2017/11/06 03:27:34 rin Exp $");
+__RCSID("$NetBSD: cl_main.c,v 1.9 2017/12/06 17:16:14 jmcneill Exp $");
#endif
#include <sys/types.h>
@@ -314,8 +314,12 @@
F_SET(clp, CL_SIGWINCH);
/* If there was a previous handler, call that. */
- if (clp->oact[INDX_WINCH].sa_handler)
+ if (clp->oact[INDX_WINCH].sa_handler != SIG_DFL &&
+ clp->oact[INDX_WINCH].sa_handler != SIG_IGN &&
+ clp->oact[INDX_WINCH].sa_handler != SIG_ERR &&
+ clp->oact[INDX_WINCH].sa_handler != SIG_HOLD) {
clp->oact[INDX_WINCH].sa_handler(signo);
+ }
}
#undef GLOBAL_CLP
Home |
Main Index |
Thread Index |
Old Index