I set a breakpoint in the shutdown hook, and debug it in intellij. But it looks like it has some timeout that it would automatically exit after some time.
Asked
Active
Viewed 165 times
1 Answers
0
In cases of System Shutdown, operating system allows a fixed amount of time for shutdown and exit. In other cases application waits for shutdown-hook to complete like ctrl C
, System.exit(status)
It is expected that shutdown-hook to finish their work quickly.

ravthiru
- 8,878
- 2
- 43
- 52