RFR: 8339487: ProcessHandleImpl native exceptions - include message text and last error information

Alan Bateman alanb at openjdk.org
Wed Sep 4 14:41:19 UTC 2024


On Wed, 4 Sep 2024 12:22:49 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> Hi , my guess is too that it is the second call. In case we want to go for a loop, should we have a maximum number of retry operations like 10 or 100 ? Another option might be to always make the buffer a little bigger (how much can be discussed) and use the larger buffer to account for some increase in the number of processes.

It may have to loop indefinitely to allow for cases where something else is forking 100+ processes. In practise I assume it will only need to retry once or twice. You could combine the approaches so that you allocate a bit more than is required to take account of a few processes created in the window between the two calls to sysctl.

So I think we should just do this. We still need to figure out the exception when sys call fails for some other reason.

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

PR Comment: https://git.openjdk.org/jdk/pull/20839#issuecomment-2329251128


More information about the core-libs-dev mailing list