Eighth Edition and job control (was Re: UNIX Futures)

Dennis Ferguson dennis at utecfc.UUCP
Wed Apr 9 15:10:23 AEST 1986


In article <559 at basser.oz> john at basser.oz (John Mackin) writes:
> [...] I am typing this on a Blit.  We have
> an Eighth Edition license and Bell Research have donated 12
> Blits to us.  The Teletype DMD5620 can be unambiguously
> referred to as: a 5620 (probably best) [....]

I am typing this on a rather dumb 24x80 terminal.  Approximate
value is $400.  I have showed your message to just about everyone
around here with funds but no one has volunteered to provide me
with the $9000 or so I would need to buy a 5620.  Some people have
all the luck.

> Now that I've got that out of the way, let's go on to discuss
> so-called job control.  The whole point about Berkeley job control
> is, it is a massive hack.  Witness the huge number of user-mode
> programs that had to be modified to know about SIGTSTP, etc.
> Not to mention the far-reaching kernel modifications [...]

For the latter, you might try obtaining 4.1BSD kernel sources and
diff'ing the parts of it which implement signals and the starting
and stopping of processes with the corresponding parts of your V8
kernel.  I'll bet you will be surprised at the small amount of output
you get.

As for user-mode programs, I just did a `grep TSTP' on files in
the directories /usr/src/{bin,usr.bin,usr.ucb} on this 4.2 system.
The programs I found sort of divide themselves into three categories.
The biggest group are those that explicitly ignore SIGTSTP, usually
along with SIGQUIT and SIGINT.  These are login, passwd, msgs, chfn,
chsh and lock.  The second were those that use SIGTSTP instead of,
or as well as, a shell escape.  These are rlogin, telnet and tip.
Finally there are those which restore their screen in some way after a
SIGTSTP.  These are ex/vi and more (note that the curses library catches
SIGTSTP so full-screen programs which use that library generally don't
bother about it).  And of course there is csh, stty and kill, but that
is about it.  I really don't know how you decided a "huge number of
user-mode programs" had to be modified, as far as I can see only a
small percentage of user-mode software from Berkeley worries about it
at all, and most of these programs simply ignore it for security reasons.

> You say as much, but then you say you still want to be able to
> stop and restart processes.  On V8, that is as easy as opening
> the process' /proc entry and doing a single ioctl().  No harder
> than doing a kill().

This is one way to use the ability to stop and restart processes which
Berkeley (or, actually, Jim Kulp at IIASA) implemented in their kernel
and V8 inherited.  ^Z is another, very different one.  I (unlike the
person you were replying to) have no doubt that a good window system
effectively eliminates the need for a suspend character (and interrupt
and quit (! a key to cause a core dump?  If ^Z was a hack, it had precedent)).
Note, however, that Berkeley job control was implemented in 1980 or
thereabouts, when window systems were at most exotic research projects.
It was certainly never intended to be a replacement for window systems;
it is their predecessor.  What ^Z is is a replacement for *its* predecessor,
the shell escape.  A shell escape requires code in each program which
implements it.  It is also not possible to implement a shell escape at
all in many programs in which it would be desirable (e.g. compilers).
The suspend character provides a uniform, centralized, transparent (relative
to actual shell escapes) facility which obsoletes the shell escape.  As
such it was successful.

Of course, window systems may have now made obsolete the suspend character.
And if you send me one of your windowing terminals I will gladly turn it
(and probably the quit character) off for good.  Until then, as long as
I am forced to use less able technology, I will stick with it, thanks.
Even, incidentally, if I am using V8, seeing as the implementor thought
to retain it in the (streams) terminal handling code.
--
Dennis Ferguson         (...!utzoo!utcsri!utecfc!dennis)
Mechanical Engineering
University of Toronto



More information about the Comp.unix.wizards mailing list