bug-texinfo
[Top][All Lists]
Advanced

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

Re: [PATCH].infokey feature and signal handling are broken


From: AIDA Shinra
Subject: Re: [PATCH].infokey feature and signal handling are broken
Date: Sat, 25 Jan 2003 18:53:19 +0900
User-agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.3 (Unebigoryƍmae) APEL/10.4 MULE XEmacs/21.4 (patch 10) (Military Intelligence) (i386-unknown-freebsd4.7)

> I installed your other changes (thanks!), but this one to fix the
> signals did not apply.  I am guessing that the FreeBSD maintainers have
> made changes to the texinfo source and did not send them back to me.
> 
> Could you try the unmodified texinfo source and send me whatever patch
> is needed relative to that?
> 
FreeBSD maintainers made this change:

Index: src/contrib/texinfo/info/signals.c
diff -u src/contrib/texinfo/info/signals.c:1.1.1.3 
src/contrib/texinfo/info/signals.c:1.6
--- src/contrib/texinfo/info/signals.c:1.1.1.3  Mon Jan 17 19:39:37 2000
+++ src/contrib/texinfo/info/signals.c  Mon Jan 17 19:46:55 2000
@@ -1,5 +1,6 @@
 /* signals.c -- install and maintain Info signal handlers.
    $Id: signals.c,v 1.6 1998/12/06 22:00:04 karl Exp $
+   $FreeBSD: src/contrib/texinfo/info/signals.c,v 1.6 2000/01/17 10:46:55 ru 
Exp $
 
    Copyright (C) 1993, 94, 95, 98 Free Software Foundation, Inc.
 
@@ -67,7 +68,7 @@
 
 static RETSIGTYPE info_signal_handler ();
 static signal_handler *old_TSTP, *old_TTOU, *old_TTIN;
-static signal_handler *old_WINCH, *old_INT, *old_USR1;
+static signal_handler *old_WINCH, *old_INT, *old_USR1, *old_CONT;
 
 void
 initialize_info_signal_handler ()
@@ -80,6 +81,9 @@
 
 #if defined (SIGWINCH)
   old_WINCH = (signal_handler *) signal (SIGWINCH, info_signal_handler);
+#if defined (SIGCONT)
+  old_CONT = (signal_handler *) signal (SIGCONT, info_signal_handler);
+#endif
 #endif
 
 #if defined (SIGINT)
@@ -166,6 +170,12 @@
 
 #if defined (SIGWINCH) || defined (SIGUSR1)
 #ifdef SIGWINCH
+#ifdef SIGCONT
+    case SIGCONT:
+      /* pretend a SIGWINCH in case the terminal window size has changed
+        while we've been asleep */
+      /* FALLTHROUGH */
+#endif
     case SIGWINCH:
 #endif
 #ifdef SIGUSR1
@@ -180,6 +190,10 @@
 #ifdef SIGWINCH
           if (sig == SIGWINCH)
             old_signal_handler = &old_WINCH;
+#ifdef SIGCONT
+         else if (sig == SIGCONT)
+           old_signal_handler = &old_CONT;
+#endif
 #endif
 #ifdef SIGUSR1
           if (sig == SIGUSR1)

This change was the source of 'C-z' problem. This should be:

--- signals.c.orig      Sat Jan 25 18:43:29 2003
+++ signals.c   Sat Jan 25 18:46:23 2003
@@ -160,6 +160,8 @@
         terminal_prep_terminal ();
         *old_signal_handler = (signal_handler *) signal (sig, 
info_signal_handler);
         redisplay_after_signal ();
+       /* window size might be changed while sleeping */
+        reset_info_window_sizes ();
         fflush (stdout);
       }
       break;

But I believe my new code is safer to reentrance. I attach the diff to
original code.

Attachment: signals.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]