> In most cases, I'd think you could do just as well to use a spawn()
Do you have a spec for spawn()? People have suggested this in unix
newsgroups at intervals over several years, and discussions have
always foundered when it comes to the details.
For unix, the problem is that there is so much that you can do between
the fork() and exec() - shuffling file descriptors, changing
directory, (un)ignoring signals etc. Do you build all these in as
arguments to spawn()?
Of course, these were discussions of *replacing* fork()/exec() in
unix. Your goal is less ambitious, but how much would you want to do?
I would have thought that connecting pipes to the child's stdin/stdout
was necessary, but how do you do that if:
> you could have a little parent process that you ask to fork copies
> of itself when you want to spawn.
Given vfork() or copy-on-write fork(), implementing spawn()
straightforwardly with fork() and exec() (rather than a helper
process) is not as expensive as it used to be for large processes.
Indeed, wasn't one of the original motivations for vfork() to make
running processes from Franz Lisp cheaper?