RFR 9: 8138566: (Process) java.lang.Process.allChildren specification clarification

Paul Sandoz paul.sandoz at oracle.com
Tue Nov 3 12:58:46 UTC 2015


> On 31 Oct 2015, at 00:41, Roger Riggs <Roger.Riggs at Oracle.com> wrote:
> 
> Please review and comment on 3 clarifications to ProcessHandle and Process.
> 
> Webrev:
> http://cr.openjdk.java.net/~rriggs/webrev-process-clarify-8138566/
> 
> 8138566: (Process) java.lang.Process.allChildren specification clarification
>   - Rename the allChildren() method to descendants() - it is more descriptive and
>      less easily confused with the children method.
>   - The risk of renaming is method is minimal since it has been only available for a short time.
> 

> 8140213: Process/ProcessHandle.onExit() spec need to be improved
>   - The timing of the completion of the CompletableFuture was too tightly specified.
>      With the isAlive method, it is possible to observe that the process has terminated
>      before the CF is completed.  The CF is completed sometime after the process terminates.
> 

> 8140250: (process) Process.info description is inaccurate
>  - The specification of the Process/ProcessHandle.info() method did not match
>     the implementation.  On an OS (Windows) some information is available about
>     the process after it is no longer alive.
> 

+1

Might be worth mentioning in a note that it may be observed that the process has terminated, via queries to isAlive, before the onExit CF has completed, but presumably never the other way around? (too weak for a happens-before relationship?).

Paul.




More information about the core-libs-dev mailing list