[TUHS] FD 2

Dan Cross crossd at gmail.com
Tue Jan 31 05:07:59 AEST 2023


On Mon, Jan 30, 2023 at 11:19 AM Ralph Corderoy <ralph at inputplus.co.uk> wrote:
> > > There was no job control on plan9 and I can't say I ever missed it.
> >
> > Just yesterday I realized running two “make -j 8” in parallel was
> > making them both go real slow so I stopped one of them with ^Z and
> > continued it once the other make finished.  This use case can’t be
> > handled with more windows.
>
> If I lacked job control in that situation, I'd either SIGSTOP one of the
> two with kill(1) for a later SIGCONT or renice it to hardly get a look
> in until its peer had finished.  (The TTY's susp character for job
> control is SIGTSTP.)

I think that Bakul's point was that there wasn't an analogue for
SIGTSTP in plan 9. You _could_ drop a `stop` into a process's
/proc/$pid/note, which was the Unix equivalent of sending `SIGSTOP`
(and I was a bit wrong earlier; that was handled by the proc driver,
not the process). I don't believe there was a binding for that in the
window system, though.

It's funny, as I thought about it a bit more, the existence of the
window system model sort of proves that there's nothing intrinsic
about how it worked that would preclude one writing, basically, a
terminal-driver in user space. No one was ever motivated to do so, but
I don't see why one couldn't have implemented job control as a
userspace primitive building on top of the existing proc/note
machinery.

        - Dan C.


More information about the TUHS mailing list