Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: zsh/terminfo unwanted exit



> TERM=invalid zsh -f
> % zmodload zsh/terminfo

will exit the shell.  This should fix that.

Index: Src/Modules/terminfo.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/terminfo.c,v
retrieving revision 1.21
diff -u -r1.21 terminfo.c
--- Src/Modules/terminfo.c	24 Jun 2003 18:07:38 -0000	1.21
+++ Src/Modules/terminfo.c	14 Sep 2003 04:59:52 -0000
@@ -376,7 +376,10 @@
 {
 #ifdef HAVE_TIGETSTR
 # ifdef HAVE_SETUPTERM
-    setupterm((char *)0, 1, (int *)0);
+    int errret;
+
+    if (setupterm((char *)0, 1, &errret) == ERR)
+	return 1;
 # endif
 
     if (!createtihash())



Messages sorted by: Reverse Date, Date, Thread, Author