The variables "[fReopenDebugLog](https://github.com/bitcoin/bitcoin/blob/fa24439ff3d8ab5b9efaf66ef4dae6713b88cb35/src/util.h#L53)" and "[fRequestShutdown](https://github.com/bitcoin/bitcoin/blob/fae78fa81802b5387054715c339f286ef436408e/src/init.cpp#L128)" should [use the data type "sig_atomic_t"](https://www.securecoding.cert.org/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers) (instead of "bool").

I reported this issue for [another evolving software](https://github.com/Electric-Coin-Company/zcash/issues/678) before.

assert(fImporting == true);
        fImporting = false;
    }
};
void CleanupBlockRevFiles()
{
    using namespace boost::filesystem;
    map<string, path> mapBlockFiles;
    
    
    
    LogPrintf("Removing unusable blk?????.dat and rev?????.dat files for -reindex with -prune\n");
    path blocksdir = GetDataDir() / "blocks";
    for (directory_iterator it(blocksdir); it != directory_iterator(); it++) {
        if (is_regular_file(*it) &&
            it->path().filename().string().length() == 12 &&
            it->path().filename().string().substr(8,4) == ".dat")
        {
            if (it->path().filename().string().substr(0,3) == "blk")
                mapBlockFiles[it->path().filename().string().substr(3,5)] = it->path();
            else if (it->path().filename().string().substr(0,3) == "rev")
                remove(it->path());
        }
    }
    
    
    
    
    int nContigCounter = 0;
    BOOST_FOREACH(const PAIRTYPE(string, path)& item, mapBlockFiles) {