From mboxrd@z Thu Jan 1 00:00:00 1970 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes Resent-Date: Thu, 28 Jan 1999 22:48:05 -0500 (EST) Date: Fri, 29 Jan 1999 04:47:46 +0100 From: Drazen Kacar To: zsh-workers@math.gatech.edu Cc: Bart Schaefer , Drazen Kacar Subject: Re: strange xterm & zsh behaviour Message-ID: <19990129044746.A21036@jagor.srce.hr> References: <990127214643.ZM31279@candle.brasslantern.com> <19990128103830.A20444@jagor.srce.hr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <19990128103830.A20444@jagor.srce.hr>; from Drazen Kacar on Thu, Jan 28, 1999 at 10:38:30AM +0100 X-Face: 'UIE}WabGB0+U>p-#(hp<_+AD2{H],=qR*jHfm$/e]l0(kU3oOYc5lqG6gg>[\h^IOc{'siD6#!T&loIShgmYHz3#+*D38:|`~\BE,(W~Ol9BDfDwk'lKJ;Z{sY8E9(ME.E]'wvNO`$n#,;9Z`tOFcW/nHZq!BOSrM>V?C<5DTw=<${c{M2V+|)0jSUl&!+8%8nIBF(u:E>SZWM^e X-Attribution: Dave X-Windows: The joke that kills. Resent-Message-ID: <"ppzio2.0.Dg6.rzIis"@math> Resent-From: zsh-workers@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Resent-Sender: zsh-workers-request@math.gatech.edu X-Mailing-List: 5099 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/ 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. -- */ + 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@srce.hr | dave@fly.cc.fer.hr