Xref: utzoo comp.sys.tandy:705 comp.unix.xenix:2074 Path: utzoo!mnetor!uunet!cbmvax!vu-vlsi!devon!paul From: paul@devon.UUCP (Paul Sutcliffe Jr.) Newsgroups: comp.sys.tandy,comp.unix.xenix Subject: Yet Another Bug in Tandy Xenix/68k 3.2 Message-ID: <754@devon.UUCP> Date: 20 Apr 88 16:39:14 GMT Distribution: na Organization: Devon Computer Services, Lancaster, PA Lines: 52 Keywords: bug Tandy Xenix 3.2 init 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@devon.UUCP | or THWIM | UUCP (dumb): ...rutgers!bpa!vu-vlsi!devon!paul +----------------------+