Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/external/bsd/nvi/dist/cl Pull up following revision(s) (r...



details:   https://anonhg.NetBSD.org/src/rev/c8e260ebeef4
branches:  netbsd-8
changeset: 434474:c8e260ebeef4
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Dec 08 06:02:11 2017 +0000

description:
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.

diffstat:

 external/bsd/nvi/dist/cl/cl_main.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 8e08c941d2a7 -r c8e260ebeef4 external/bsd/nvi/dist/cl/cl_main.c
--- a/external/bsd/nvi/dist/cl/cl_main.c        Fri Dec 08 05:56:04 2017 +0000
+++ b/external/bsd/nvi/dist/cl/cl_main.c        Fri Dec 08 06:02:11 2017 +0000
@@ -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 @@
        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