diff options
author | immartynov <immartynov@yandex-team.ru> | 2022-02-10 16:51:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:51:52 +0300 |
commit | e9b931bef4870ab86a59bda2ef913c3238f0ba19 (patch) | |
tree | 4241c6bdace6ec3178aba51687814f2abece1f9e /util/system/execpath.cpp | |
parent | 45d88ab6257c06a37cf909ba04512ba970eca425 (diff) | |
download | ydb-e9b931bef4870ab86a59bda2ef913c3238f0ba19.tar.gz |
Restoring authorship annotation for <immartynov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/execpath.cpp')
-rw-r--r-- | util/system/execpath.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/system/execpath.cpp b/util/system/execpath.cpp index 33198af58b..c5ea4431a3 100644 --- a/util/system/execpath.cpp +++ b/util/system/execpath.cpp @@ -156,24 +156,24 @@ static TString GetExecPathImpl() { } static bool GetPersistentExecPathImpl(TString& to) { -#if defined(_solaris_) +#if defined(_solaris_) to = TString("/proc/self/object/a.out"); return true; #elif defined(_linux_) || defined(_cygwin_) to = TString("/proc/self/exe"); return true; -#elif defined(_freebsd_) +#elif defined(_freebsd_) to = TString("/proc/curproc/file"); return true; #else // defined(_win_) || defined(_darwin_) or unknown Y_UNUSED(to); return false; -#endif -} - +#endif +} + namespace { - struct TExecPathsHolder { - inline TExecPathsHolder() { + struct TExecPathsHolder { + inline TExecPathsHolder() { ExecPath = GetExecPathImpl(); if (!GetPersistentExecPathImpl(PersistentExecPath)) { @@ -186,14 +186,14 @@ namespace { } TString ExecPath; - TString PersistentExecPath; + TString PersistentExecPath; }; } const TString& GetExecPath() { return TExecPathsHolder::Instance()->ExecPath; } - -const TString& GetPersistentExecPath() { + +const TString& GetPersistentExecPath() { return TExecPathsHolder::Instance()->PersistentExecPath; -} +} |