On Tue, 19 Aug 2025 21:52:10 GMT, Archie Cobbs <aco...@openjdk.org> wrote:

>> Roger Riggs has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Revisited handling of IOExceptions to throw instead of completely ignoring 
>> or logging.
>
> src/java.base/share/classes/java/lang/Process.java line 652:
> 
>> 650:      */
>> 651:     public void close() throws IOException {
>> 652:         synchronized(this) {
> 
> Might be safer to create a dedicated, private object to use for locking here 
> instead of `this`. Otherwise there's a possibility of deadlock (or indefinite 
> delay), for example, if a subclass happens to have a `synchronized` method 
> that could block while trying to communicate with the process, etc.

There are other `synchronized(this)` within Process, its cleaner to stay 
consistent and update them later in a separate PR.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26649#discussion_r2289204143

Reply via email to