RFR: 8288984: Simplification in Shutdown.exit [v2]

Alan Bateman alanb at openjdk.org
Mon Jul 4 16:34:32 UTC 2022


On Mon, 4 Jul 2022 16:13:10 GMT, Ryan Ernst <duke at openjdk.org> wrote:

>> David's refinement looks good.  The sentence on deadlock is accurate as shutdown hooks run on other threads, not the thread calling System.ext.
>
> I reworded with the suggested text in mind. I also added another sentence referencing native signal handlers, which may also initiate shutdown. I think this clarification is important so that it is clear the status code of all invocations from Java may still be ignored. See [2253259](https://github.com/openjdk/jdk/pull/9351/commits/2253259c82b13e7b2186429a80cc42497235b035).

I think the wording in the latest commit (9d972b) is problematic. One reason is that you've changed it to "will run shutdown hooks" but it doesn't run the hooks, it starts them, and so conflicts with the previous paragraph. I also think "That invocation may be initiated via platform specific signal handlers" is confusing here as there is no notion of "signal handler" to reference. There may be scope for text elsewhere, maybe with an implNote for signals such as HUP, but I don't think this is the PR for this. So I think it better to try the wording that David suggested and see if it needs any improvement.

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

PR: https://git.openjdk.org/jdk/pull/9351


More information about the core-libs-dev mailing list