> 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 incrementally with two additional commits since the last revision: - patch from rriggs (modified slightly) - patch contributed by rriggs ------------- Changes: - all: https://git.openjdk.org/jdk/pull/30763/files - new: https://git.openjdk.org/jdk/pull/30763/files/3d447abc..93e7b53e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=30763&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=30763&range=07-08 Stats: 116 lines in 8 files changed: 54 ins; 50 del; 12 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
