Can be tested by calling -reindex or -loadblock and then pressing CTRL+C.
Should print something like:
... 2020-04-27T19:34:31Z [loadblk] Reindexing block file blk00005.dat... ^C2020-04-27T19:34:32Z [loadblk] Shutdown requested. Exit ThreadImport 2020-04-27T19:34:32Z [qt-init] Interrupting HTTP server ...
This is a backport of Core PR18786