Yet Another Bug in Tandy Xenix/68k 3.2
Paul Sutcliffe Jr.
paul at devon.UUCP
Thu Apr 21 02:39:14 AEST 1988
I have uncovered (I think) another Tandy Xenix 3.2 bug:
The 3.2 /etc/init allows one to (quoting from the man page:) "specify
an alternate getty program in the /etc/inittab [sic(*)] file." Okay, so I
have /etc/mygetty that I want to run on tty01 and tty02. For reasons I shall
not explain here, one of the mygetty's needs an argument; the other doesn't.
Also quoting the man page (referring to the inittab file): "The fourth field
contains the name of the alternate getty program for that terminal, and an
optional space and argument."
[ (*) sic because it isn't *real* inittab file syntax. :-( ]
So, here is what I had /etc/inittab saying:
0:01::/etc/mygetty foobar
0:02::/etc/mygetty
Well, when init starts up the two mygetty's, guess what:
$ ps -ft 01 -t 02
UID PID PPID C STIME TTY TIME COMMAND
root 8980 1 0 12:06:52 01 0:00 -3 foobar
root 8981 1 0 12:06:52 02 0:00 -4 foobar
$
Both mygettys are handed the "optional argument!" I tried reversing the
order of the two lines in the inittab file, but the same thing occurred.
My 'solution' was to change inittab to say:
0:01::/etc/mygetty foobar
0:02::/etc/mygetty 0
and then handle the argument processing this way (mygetty.c code fragment):
char *lname = NULL;
...
if (argc > 2)
lname = *++argv;
...
if (lname != NULL && *lname != '0' && ...)
^^^^^^^^^^^^^^^^
This works, but doesn't explain why /etc/init is munging the handling
of its inittab file.
- paul
--
Paul Sutcliffe, Jr. +----------------------+
| THINK ... |
UUCP (smart): paul at devon.UUCP | or THWIM |
UUCP (dumb): ...rutgers!bpa!vu-vlsi!devon!paul +----------------------+
More information about the Comp.unix.xenix
mailing list