Autobaud Getty oddities
Steve Manning
stv at ferret.UUCP
Sun Apr 8 03:45:21 AEST 1990
In article <27581 at ut-emx.UUCP> jon at walt.cc.utexas.edu (Jon Boede) writes:
>
> [description of gettyfe omitted]
>
>The program opens file descriptor 0 and then dups it THREE (not two) times to
>produce the stdout, stderr and a fourth fd which is the source of my
>frustration. The fourth fd exists so that when 0, 1 and 2 are closed, the
>line isn't hung up with the last close.
>This leaves 3 open -- sloppy and a waste, but currently necessary.
>
>I modified the program to just open 0 and then turn off HUPCL before closing
>it. This "works" fine excepting that no matter what one types at the login:
>prompt, one gets back "Invalid login." before a password is ever asked for. If
>this isn't strange enough, if there are logins that don't have passwords, such
>as "who", they work just fine!
I had an identical experience with a getty front-end that I wrote which would
accept print jobs from PC-based word processors and pass them off to lp.
We also wanted the PC's to be able to act like terminals at times to, so my
front-end would listen on the line for <esc><esc>_?, which was the print job
preamble. When it received this sequence, it read the entire print job into a
tmp file and then sent the print file to lp. (If I just exec-d lp right away
so that it would print from stdin, I would always loose some data in the switch-
over.) If anything but the preamble was received, it exec'd the real getty.
I used a flag gettydefs code which indicated to my program if it was running on
a printable-to port or not (i.e. the console or modem). If not, it exec'd the
real getty right away and all was OK, but on the printable ports where my
program had been listening for a while to stdin, passwd would not work.
passwd would exit without acepting any input (either when accepting a password
after a login name or when trying to set a password on a login that didn't have
one). But all was OK on the console!!! You could still enter, set and change
passwords.
I would also be interested in further information on this phenomonon. Please
post or e-mail me more info. I'd also like a copy of the gettyfe code, if
anyone has it laying around. We are a new site on the net, and so didn't see
it the first time around.
(Hope I don't get swamped with responses, but ya gotta takes chances!)
TIA
stv
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Steve Manning | "...but you're wrong, Steve.
...!uunet!marque!introl!ferret!stv | You see, it's only Solitaire" I.A.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
More information about the Comp.unix.xenix
mailing list