SVR3.0 vs BSD4.3

ECSC68 S Brown CS simon at its63b.ed.ac.uk
Fri Apr 8 04:07:47 AEST 1988


In article <445 at vsi.UUCP> friedl at vsi.UUCP (Stephen J. Friedl) writes:
>>In article <7542 at brl-smoke.ARPA>, gwyn at brl-smoke.ARPA (Doug Gwyn ) writes:
>< In article <2050 at munnari.oz> kre at munnari.oz (Robert Elz) writes:
>< >But that's not job control.  Job control is when I notice that /foobar
>< >is 98% full, and some cretin has a job running that's half way through
>< >extracting 160Mb from a tar tape .. "kill -STOP <pid>" is job control.
>< 
>Shell layers do not involve any kind of signals.  When ^Z is hit,
>the sxt driver gives control back to channel zero, which is
>usually the layer manager (here, /usr/bin/shl).  When a user
>command to shl asks that a child layer be run, the layer manager
>issues an ioctl to the multiplexor to give control to the child's
>layer (there is no SIGCONT).  One result of this implementation
>is that I know of no way for a layer to suspend itself, certainly
>not with signals.

If your layer manager keeps the desciptor for channel zero open in it's
subprocesses (and provides some method to allow these children to find
out what descriptor it is - such as reserving a known descriptor for
this use [Yeauch!]), then the subprocesses can do ioctls on this, so they
can issue the ioctl to switch the current layer to zero, just as if ^Z
had been typed.

>Nevertheless it is not incorrect to equate job-control with shell
>layers in a general kind of way -- kre's way just may be more general
>than mine :-).

Well, the only ESSENTIAL difference is that BSD job-control is cpu-control
whereas SysV layers is io-control (you control what jobs can/cannot do input
and/or output, rather than what jobs can/cannot be actively running). It's
quite possible to put job-control code into a shell using layers that looks
pretty close to BSD job-control - except that you can't control jobs that
aren't doing terminal io.

--Simon
-- 
--------------------------------------------------
| Simon Brown                                    |
| Laboratory for Foundations of Computer Science |
| Department of Computer Science                 |
| University of Edinburgh, Scotland, UK.         |
--------------------------------------------------
 UUCP:  uunet!mcvax!ukc!lfcs!simon
 ARPA:  simon%lfcs.ed at nss.cs.ucl.ac.uk
 JANET: simon at uk.ac.ed.lfcs



More information about the Comp.unix.wizards mailing list