Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $TERM, zsh/termcap, crash
- X-seq: zsh-users 14548
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: $TERM, zsh/termcap, crash
- Date: Wed, 11 Nov 2009 08:09:41 -0800
- In-reply-to: <20091111103932.4454.qmail@xxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20091111103932.4454.qmail@xxxxxxxxxxx>
On Nov 11, 11:39pm, Atom Smasher wrote:
} Subject: $TERM, zsh/termcap, crash
}
} if $TERM is not defined on a system and the zsh/termcap module is loaded,
} the shell dies.
#0 0x003a9f24 in _exit () from /lib/tls/libc.so.6
#1 0x00348604 in exit () from /lib/tls/libc.so.6
#2 0x009b28ac in setupterm (tname=0x96e2835 "xterm-hundred-billion-colors",
Filedes=1, errret=0x0) at ../../ncurses/tinfo/lib_setup.c:525
#3 0x080d7eec in boot_zshQstermcap (m=0x96db3a0)
at ../../../zsh-4.0/Src/Modules/termcap.c:372
This seems to fix it for me, but it may need configure-time testing
on some platforms.
Index: termcap.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/Modules/termcap.c,v
retrieving revision 1.17
diff -c -r1.17 termcap.c
--- termcap.c 4 Nov 2008 04:47:53 -0000 1.17
+++ termcap.c 11 Nov 2009 16:08:35 -0000
@@ -369,7 +369,10 @@
{
#ifdef HAVE_TGETENT
# ifdef HAVE_SETUPTERM
- setupterm((char *)0, 1, (int *)0);
+ int errret = 0;
+ if (setupterm((char *)0, 1, &errret) == ERR) {
+ return 1;
+ }
# endif
#endif
return 0;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author