On Tue, May 01, 2001 at 05:06:47PM +0000, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > > 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. Good point. > } 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. Well, setserial doesn't like "^pgrp_lockout", but "^session_lockout" seems to help in that I can interrupt the zsh using ^C - but that ends the zsh session which is not exactly what I want :) Uhm... the trick is not even that complicated: Just use /sbin/getty instead of /sbin/mgetty - voila, all works like a charm :-) Now guess why it's called m(odem)getty and not vtgetty :) Thanks, Thomas -- Thomas Köhler Email: jean-luc@xxxxxxxxxxxxxxxxx | LCARS - Linux <>< WWW: http://jeanluc-picard.de | for Computers IRC: jeanluc | on All Real PGP public key available from Homepage! | Starships
Attachment:
pgpQ0EThVVTmN.pgp
Description: PGP signature