SH buglette.

Lee McLoughlin lee at west44.UUCP
Tue Jul 3 10:16:52 AEST 1984


I was poking around in  our  shell  (V7)  source  and  found  the
following in main.c.

	userid=getuid();

	/* decide whether interactive */
	/*
	 * NJH 20.5.82
	 * now use ioctl not gtty
	 */
	IF (flags&intflg) ORF ((flags&oneflg)==0 ANDF ioctl(output,TIOCGETP,&statb)==0 ANDF ioctl(input,TIOCGETP,&statb)==0)
	THEN	dfault(&ps1nod, (userid?stdprompt:supprompt));
		dfault(&ps2nod, readmsg);
		flags |= ttyflg|prompt; ignsig(KILL);

Then did a double take.  The  ioctl's  do  work  instead  of  the
gtty/stty  but  what is this strange looking statb? In our source
it is declared as a struct statb! The fix is obvious, declare and
use  a  struct  sgtty  instead.  I've  found the same buglette at
another V7 site. This is probably an old bug but  I  thought  I'd
mention it anyway.


-- 
--------------
Lee McLoughlin	<UK>!ukc!lmcl, west44!lee
	UKUUCP support.



More information about the Comp.unix.wizards mailing list