These pieces of code:
https://github.com/bitcoin/bitcoin/blob/8ab4f282c06d67074b872dbda0be37636fdd5186/src/util/system.cpp#L302
and
https://github.com/bitcoin/bitcoin/blob/8ab4f282c06d67074b872dbda0be37636fdd5186/src/util/system.cpp#L864
do not work as expected because they are called before the `InitLogging()` call.

umask(077);
    }
    
    registerSignalHandler(SIGTERM, HandleSIGTERM);
    registerSignalHandler(SIGINT, HandleSIGTERM);
    
    registerSignalHandler(SIGHUP, HandleSIGHUP);
    
    signal(SIGPIPE, SIG_IGN);
#else
    SetConsoleCtrlHandler(consoleCtrlHandler, true);
#endif
    std::set_new_handler(new_handler_terminate);
    return true;
}
bool AppInitParameterInteraction()
{
    const CChainParams& chainparams = Params();
    
    
    
    
    
    std::string network = gArgs.GetChainName();
    for (const auto& arg : gArgs.GetUnsuitableSectionOnlyArgs()) {
        return InitError(strprintf(_("Config setting for %s only applied on %s network when in [%s] section."), arg, network, network));
    }
    
    for (const auto& section : gArgs.GetUnrecognizedSections()) {
        InitWarning(strprintf("%s:%i " + _("Section [%s] is not recognized."), section.m_file, section.m_line, section.m_name));