> Hi, > > This is a small fix for j.l.ProcessHandle on MacOS. Unlike other platforms, > Mac returns a ProcessHandle for pid 0 whose descendants are _all_ processes > on the system. This specific scenario tickles an off by one error where the > descendants method tries to access an element past the end of the array of > pids. The fix is to break from the loop before accessing this element. > > Thanks, > > Michael > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Michael McMahon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision: - Merge branch 'master' into pidzero - Update src/java.base/share/classes/java/lang/ProcessHandleImpl.java Co-authored-by: Andrey Turbanov <[email protected]> - updated impl and test - Merge branch 'master' into pidzero - remove files - remove imports not needed - fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/30763/files - new: https://git.openjdk.org/jdk/pull/30763/files/ce462da4..5f978aae Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=30763&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=30763&range=04-05 Stats: 8568 lines in 521 files changed: 6014 ins; 949 del; 1605 mod Patch: https://git.openjdk.org/jdk/pull/30763.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30763/head:pull/30763 PR: https://git.openjdk.org/jdk/pull/30763
