zsh-workers
 help / color / mirror / code / Atom feed
* small problem under HP/UX (incl. workaround)
@ 1995-08-21 15:33 nk%HPLEY1
  0 siblings, 0 replies; only message in thread
From: nk%HPLEY1 @ 1995-08-21 15:33 UTC (permalink / raw)
  To: zsh-list


Hi, zsh-2.6-beta10 has a samll but annoying problem ay least under
HP/UX 9.04: If you have a running xterm and then execute

su - joe

with joe being a user with zsh as his login shell, the wonderful line
editing options dosen't work any more. It does work if yuou ran a new
xterm for joe. The problem is that the corresponding tty can't be
written by joe (because it's own by me.) when accessed through it's
right name. The good news it that it does work when the terminal is
accessed through "/dev/tty". Therefore I changed the code in init.c to
first use ttyname(0) and if this fails, use "/dev/tty" (which is used
anyway if fd 0 is not a tty). Here comes the small patch:

diff -u zsh-2.6-beta10/Src/init.c\~ zsh-2.6-beta10/Src/init.c
--- zsh-2.6-beta10/Src/init.c~	Sat Jul  1 00:06:20 1995
+++ zsh-2.6-beta10/Src/init.c	Mon Aug 21 17:22:25 1995
@@ -334,9 +334,10 @@
     }
 
     /* Make sure the tty is opened read/write. */
-    if (isatty(0))
+    SHTTY = -1;
+    if (isatty(0)) 
 	SHTTY = movefd(open(ttyname(0), O_RDWR));
-    else
+    if (SHTTY == -1)
 	SHTTY = movefd(open("/dev/tty", O_RDWR));
 
     if (SHTTY != -1) {

Diff exited abnormally with code 1 at Mon Aug 21 17:32:03


    so long

	Norbert

Norbert Kiesel   Software-Ley GmbH        
Lindenstr. 15    Phone: +49 2238 96600    Some say: "Microsoft is the answer." 
D-50259 Pulheim  Fax:   +49 2238 50842	  This is wrong.  Microsoft is the     
Germany          Email: nk@col.sw-ley.de  question--and the answer is "No!".   





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-08-21 17:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-08-21 15:33 small problem under HP/UX (incl. workaround) nk%HPLEY1

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).