Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: strange xterm & zsh behaviour
- X-seq: zsh-workers 5099
- From: Drazen Kacar <dave@xxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: strange xterm & zsh behaviour
- Date: Fri, 29 Jan 1999 04:47:46 +0100
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Drazen Kacar <dave@xxxxxxx>
- In-reply-to: <19990128103830.A20444@xxxxxxxxxxxxx>; from Drazen Kacar on Thu, Jan 28, 1999 at 10:38:30AM +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <slrn7av4lh.d2q.dave@xxxxxxxxxxxxx> <990127214643.ZM31279@xxxxxxxxxxxxxxxxxxxxxxx> <19990128103830.A20444@xxxxxxxxxxxxx>
Drazen Kacar wrote:
> > } Control keys and arrow keys don't work any
> > } more. The shell just echos ^[[A (for example) instead of scrolling
> > } through the history list. Ctrl-C is being echoed as ^C and the shell
> > } doesn't prompt in a new line.
Here's the patch for zsh 3.0.5 which fixes that:
--- init.c.orig Fri Jan 29 04:10:39 1999
+++ init.c Fri Jan 29 04:29:49 1999
@@ -328,11 +328,20 @@
zsfree(ttystrname);
ttystrname = ztrdup("/dev/tty");
}
+#ifdef ALL_PRAISE_SUN
+/* xterm, rxvt and probably all terminal emulators except dtterm on
+ Solaris 2.6 & 7 have a bug. Applications are unable to open /dev/tty
+ or /dev/pts/<terminal number here> because something in Sun's STREAMS
+ modules doesn't like it. The open() call fails with EBUSY which
+ is not even listed as a possibility in the open(2) man page.
+ So we'll try to outsmart The Company. -- <dave@xxxxxxx> */
+ if (SHTTY == -1 && isatty(0) && (ttystrname = ztrdup(ttyname(0))))
+ SHTTY = movefd(dup(0));
+#endif
if (SHTTY == -1) {
zsfree(ttystrname);
ttystrname = ztrdup("");
}
-
/* We will only use zle if shell is interactive, *
* SHTTY != -1, and shout != 0 */
if (interact && SHTTY != -1) {
I'll leave the job of defining ALL_PRAISE_SUN to the maintainers. It
should be defined for Solaris 2.6 and above. In case Sun produces a patch
which fixes this problem, SHTTY won't be -1 and the bug fix code won't be
executed. Hopefully.
--
.-. .-. Life is a sexually transmitted disease.
(_ \ / _)
| dave@xxxxxxx
| dave@xxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author