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

Roger Riggs Roger.Riggs at Oracle.com
Tue Nov 3 16:21:10 UTC 2015


Hi Paul,

Thanks for the review.

The webrev is updated in place:
http://cr.openjdk.java.net/~rriggs/webrev-process-clarify-8138566/


I added an @apiNote to both onExit methods:

      * The process may be observed to have terminated with {@link #isAlive}
      * before the ComputableFuture is completed and dependent actions 
are invoked.

It is not strong enough for happens-before due to multi-threading 
possibly under conditions
where a thread might experience arbitrary delays in the implementation 
of isAlive.

A minior update in ProcessUtil: the getAllChildren is renamed to 
getDescendants.

Thanks, Roger




On 11/3/2015 7:58 AM, Paul Sandoz wrote:
>> 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