From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3870 invoked from network); 1 May 2001 17:07:35 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 May 2001 17:07:35 -0000 Received: (qmail 8264 invoked by alias); 1 May 2001 17:07:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14188 Received: (qmail 8243 invoked from network); 1 May 2001 17:07:24 -0000 From: "Bart Schaefer" Message-Id: <1010501170648.ZM7145@candle.brasslantern.com> Date: Tue, 1 May 2001 17:06:47 +0000 In-Reply-To: <20010501114831.A16624@picard.franken.de> Comments: =?iso-8859-1?Q?_In_reply_to__Thomas_K=F6hler_=3Cjean-luc=40picar?= =?iso-8859-1?Q?d=2Efranken=2Ede=3E?= =?iso-8859-1?Q?________=22zsh_on_serial_line=3F=22_=28May__1=2C_11=3A48am?= =?iso-8859-1?Q?=29?= References: <20010501114831.A16624@picard.franken.de> X-Mailer: Z-Mail (5.0.0 30July97) To: =?iso-8859-1?Q?Thomas_K=F6hler?= , zsh-workers@sunsite.dk Subject: Re: zsh on serial line? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 1, 11:48am, Thomas wrote: } Subject: zsh on serial line? } } I have a digital VT510 which I connected to my PC's second serial port, } /dev/ttyS1, and on the linux box, I started "mgetty -r /dev/ttyS1". }[...] } [snipped lots of syscalls] } readlink("/proc/self/fd/0", "/dev/ttyS1", 4095) = 10 } open("/dev/ttyS1", O_RDWR|O_NOCTTY|0x8000 } } Uhm. It stops when trying to open /dev/ttyS1 - what is it waiting for? It must be this code in init.c: /* Make sure the tty is opened read/write. */ if (isatty(0)) { zsfree(ttystrname); if ((ttystrname = ztrdup(ttyname(0)))) { SHTTY = movefd(open(ttystrname, O_RDWR | O_NOCTTY)); The kernel probably thinks that ttyS1 is a modem line and is imposing the "two-device / kernel-locking scheme" mentioned under the -b option in the mgetty manual page. } How can I change that? Try using "setserial ^session_lockout ^pgrp_lockout" on the line, but I've never actually done that so I don't know if it will make any difference. If that doesn't help, try commenting out the `SHTTY = ...' line so that the code falls through to this later bit: if (SHTTY == -1 && rdwrtty(0)) { SHTTY = movefd(dup(0)); } However, I'd be concerned that you're going to have problems with any program that tries to open /dev/tty or /dev/fd/0 or /proc/self/fd/0, so you probably want to get this cleared up at the device level rather than in the zsh code. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net