Disgusting Kernel Hack

Gregory R. Travis greg at isrnix.UUCP
Wed Jan 18 12:20:54 AEST 1984


  Many people have written to the net and to me about my comment regarding
hacking the tty driver to do paging.  I'm still not convinced that it is
at all kosher.  It seems that a lot of anger is being directed at 'more'
itself - I'll agree that 'more' is a bit 'more' (hehee (*sorry*)) than it
needs to be.  I do have several additional points:

	1) More on our system (2.8BSD 11/44) isn't slow starting up. In
	   fact, I can't tell when readnews needs to fire more up and when
	   it doesn't.  This may be our system though, we have 'more'
	   with the sticky bit on and some other kernel hacks 
	   (not disgusting ones though!) to speed file I/O and execs.
	2) I am biased, I worked on a 300 baud CDC Kronos system for
	   5 years before moving up to UNIX @ 9600 baud.  Nothing that I can
	   think of even comes close to the thrill of seeing that little
	   '--More--' IN REVERSE VIDEO pop up on my Televideo 925.  I
	   really don't want to lose it.
	3) To make the kernel page nicely, you have to at least make it
	   give you a prompt when it pauses so that the new user won't
	   go home after 30 minutes thinking that the system died when
	   actually it wants him to hit return.  That means that the KERNEL
	   has to send a TEXT message (like '--More--') to a users terminal.
	   The thought of the kernel sending messages to regular ttys (not the
	   console) makes me shudder.  Again, this is a personal bias.  I 
	   hacked (a pretty hack, tho) a control-T into our kernel 2 years
	   ago and the thought of adding the code to print strings and check
	   for buffer overflows and the like still sends shivers up and
	   down my spine (I woke up feverish and screaming last night after
	   a nightmare where I was logged into our system with
	   a 'paging' tty driver and it started giving me a help menu!).
	4) To add onto point #3 above. Once you get to the point where you
	   are saying "Ok, lets make the kernel talk to joe user" you start
	   saying "Wasn't 'more' neet when it would print in reverse video?
	   Let's add an ioctl to pass terminal attributes to the tty driver!"
	   "Yeah! And ioctl's to do cursor addressing!."  That kind of
	   stuff is for giant monitors like TOPS-10.  Not UNIX.  If you don't
	   like 'more' write your own.  At least as a user-level program you
	   can replace it.  If it goes into the kernel, you're out of luck
	   bucko.

  My fundamental argument is that if 'more' doesn't perform as you would like,
change it!  Don't change the kernel.  If you want a huge lumbering kernel,
get MVS!  I could go on, but I think I've already gone on enough about a 
fairly benign subject.  Flames/comments/discussion are welcome.

Is my grammar ok?
-- 
    Gregory R. Travis
    Institute for Social Research - Indiana University - Bloomington, In
    ihnp4!inuxc!isrnix!greg
    {pur-ee,allegra,qusavx}!isrnix!greg



More information about the Comp.unix.wizards mailing list