[racket] adding other objects to custodian

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jul 5 09:09:01 EDT 2010

At Sun, 4 Jul 2010 21:08:33 -0400, Sam Tobin-Hochstadt wrote:
> On Sun, Jul 4, 2010 at 6:45 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> > At Sun, 4 Jul 2010 16:26:21 -0400, Eli Barzilay wrote:
> >> On Jul  4, Matthew Flatt wrote:
> >> > [...]
> >> >
> >> >  * A subprocess can create any number of sub-subprocesses itself, and
> >> >    there's no way to kill those, which isn't very custodian-like.
> >>
> >> Isn't a process group the way to solve this?
> >
> > My impression from looking into this before was that process groups
> > don't help. Can't a subprocess just declare itself to be a new process
> > group (and there's no hierarchy)?
> 
> From the wikipedia article on process groups:
> 
> "Process groups are themselves grouped into sessions. Process groups
> are not permitted to migrate from one session to another, and a
> process may only create new process groups belonging to the same
> session as it itself belongs to. Processes are not permitted to join
> process groups that are not in the same session as they themselves
> are." I can't figure out if you can send a signal to every process
> group in a session, but you could emulate that (maybe) by iterating
> over all the processes.

I'm not getting the point here. As far as I know, a subprocess can
create a new session in much the same way that it can create a new
group, so it doesn't seem any different than groups for the goal of
reliable process control.

> From a best effort perspective, I think sending the signal to the
> process group is more custodian-like.

I'm not sure I understand this suggestion, either. Do you mean that
Racket should create a process group for each subprocess that it
launches? Wouldn't that interfere with the role of process groups for
job control in a shell?



Posted on the users mailing list.