#include "execpath.h" #include "progname.h" #include #include static const char* Argv0; namespace { struct TProgramNameHolder { inline TProgramNameHolder() : ProgName(GetFileNameComponent(Argv0 ? Argv0 : GetExecPath().data())) { } TString ProgName; }; } // namespace const TString& GetProgramName() { return Singleton()->ProgName; } void SetProgramName(const char* argv0) { Argv0 = argv0; }