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.

{
    
    boost::filesystem::path pathLog = GetDataDir() / "debug.log";
    FILE* file = fopen(pathLog.string().c_str(), "r");
    if (file && boost::filesystem::file_size(pathLog) > 10 * 1000000)
    {
        
        std::vector <char> vch(200000,0);
        fseek(file, -((long)vch.size()), SEEK_END);
        int nBytes = fread(begin_ptr(vch), 1, vch.size(), file);
        fclose(file);
        file = fopen(pathLog.string().c_str(), "w");
        if (file)
        {
            fwrite(begin_ptr(vch), 1, nBytes, file);
            fclose(file);
        }
    }
    else if (file != NULL)
        fclose(file);
}
#ifdef WIN32
boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate)