RFR: 8034944: (process) Improve subprocess handling on Solaris

Rob McKenna rob.mckenna at oracle.com
Mon Mar 24 04:38:12 UTC 2014


Hi folks,

Roger Riggs (cc'd) may want to chip in here as he's looking at the 
reaper thread arrangement in 9 at the moment.

On another note, I too support the merging of those files. I didn't 
think there was much appetite for it at the time so I must admit this 
fell down my todo list. Looking at this bug did remind me that its 
something worth trying though. As per Alan's mail, I'm going to tackle 
it separately if you folks don't mind. I'll have a look at Peter's 
changes (thanks Peter!) as soon as I can and see about getting them in.

     -Rob

On 23/03/14 22:30, Martin Buchholz wrote:
>
>
>
> On Sun, Mar 23, 2014 at 2:34 AM, Martin Buchholz <martinrb at google.com 
> <mailto:martinrb at google.com>> wrote:
>
>
>     We have also thought about whether having reaper threads is
>     necessary.  The Unix rule is that child processes should be waited
>     for, and some thread needs to do that.  There's no way to wait for
>     a set of child pids, or to specify a "completion handler".  Well,
>     you might be able to get the newish waitid() to do what you want,
>     but it looks like it's not sufficient when java is running inside
>     a process that might do independent subprocess creation outside of
>     the JVM.
>
>
> Actually, I take it back.  With sufficient work, it looks like you can 
> get SIGCHLD to give you pid information in siginfo_t si_pid, and that 
> can be used to trigger the reaping.  It looks like waitpid is 
> "async-signal-safe", so we can call it from our signal handler.
>
> While we're at it we can fix SIGCHLD handling to do signal chaining, 
> as with other signals.




More information about the core-libs-dev mailing list