[TUHS] Systematic approach to command-line interfaces

Lars Brinkhoff lars at nocrew.org
Tue Aug 3 03:33:29 AEST 2021

John Cowan wrote:
> Andrew Warkentin wrote:
> > There's a third kind of primitive that is superior to either spawn()
> > or fork() IMO, specifically one that creates a completely empty
> > child process and returns a context that lets the parent set up the
> > child's state using normal APIs.
> In that case you don't need *any* primitive except create_empty_process():
> you can do exec() by opening the file, writing to /proc/<child>/mem

That's almost exactly what what ITS does.  You open the USR: device and
get a file descriptor (not really, but close enough) into the child
process (inferior job).

More information about the TUHS mailing list