Module Name: src
Committed By: jmcneill
Date: Wed Dec 6 17:16:14 UTC 2017
Modified Files:
src/external/bsd/nvi/dist/cl: cl_main.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/nvi/dist/cl/cl_main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/nvi/dist/cl/cl_main.c
diff -u src/external/bsd/nvi/dist/cl/cl_main.c:1.8 src/external/bsd/nvi/dist/cl/cl_main.c:1.9
--- src/external/bsd/nvi/dist/cl/cl_main.c:1.8 Mon Nov 6 03:27:34 2017
+++ src/external/bsd/nvi/dist/cl/cl_main.c Wed Dec 6 17:16:14 2017
@@ -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 @@ h_winch(int signo)
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