[crac] RFR: Handle open file descriptors with configurable policies [v9]
Anton Kozlov
akozlov at openjdk.org
Mon Jul 3 14:53:21 UTC 2023
On Mon, 3 Jul 2023 14:27:45 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
>> How would you expect to specify *which* FD should not throw, without fetching the details through native code? Would a numeric identifier (or full wildcard) be sufficient?
>
> Alternatively, we could change the claiming process to create a FD -> higher resource reference when the FD is accepted in the resource (constructor or setter), preventing this altogether from happening. Regrettably one FD would have to be able to reference multiple resources this way, though.
I'd propose a numeric id, and ideally a regex for the native description, without trying to interpret that on the FD level.
Another use-case for these FD policies is to work around a forgotten claim from a higher-level Java object, which should be considered as a JDK bug. It will be uncommon and will be discouraged, but anyway, worth to have as a workaround.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/69#discussion_r1250973147
More information about the crac-dev
mailing list