Module Name: src
Committed By: msaitoh
Date: Fri Dec 8 06:02:11 UTC 2017
Modified Files:
src/external/bsd/nvi/dist/cl [netbsd-8]: cl_main.c
Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #428):
external/bsd/nvi/dist/cl/cl_main.c: revision 1.9
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.5.8.1 -r1.5.8.2 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.5.8.1 src/external/bsd/nvi/dist/cl/cl_main.c:1.5.8.2
--- src/external/bsd/nvi/dist/cl/cl_main.c:1.5.8.1 Sat Sep 23 17:04:40 2017
+++ src/external/bsd/nvi/dist/cl/cl_main.c Fri Dec 8 06:02:11 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: cl_main.c,v 1.5.8.1 2017/09/23 17:04:40 snj Exp $ */
+/* $NetBSD: cl_main.c,v 1.5.8.2 2017/12/08 06:02:11 msaitoh 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.5.8.1 2017/09/23 17:04:40 snj Exp $");
+__RCSID("$NetBSD: cl_main.c,v 1.5.8.2 2017/12/08 06:02:11 msaitoh Exp $");
#endif
#include <sys/types.h>
@@ -313,8 +313,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