ProcessReaper: single thread reaper

Martin Buchholz martinrb at
Wed Apr 9 17:02:47 UTC 2014

On Tue, Apr 8, 2014 at 11:08 PM, Peter Levart <peter.levart at>wrote:

> Hi Martin,
> As you might have seen in my later reply to Roger, there's still hope on
> that front: setpgid() + wait(-pgid, ...) might be the answer. I'm exploring
> in that direction. Shells are doing it, so why can't JDK?
> It's a little trickier for Process API, since I imagine that shells form a
> group of processes from a pipeline which is known in-advance while Process
> API will have to add processes to the live group dynamically. So some races
> will have to be resolved, but I think it's doable.

This is a clever idea, and it's arguably better to design subprocesses so
they live in separate process groups (emacs does that), but:
Every time you create a process group, you change the effect of a user
signal like Ctrl-C, since it's sent to only one group.
Maybe propagate signals to the subprocess group?  It's starting to get

More information about the core-libs-dev mailing list