diff options
author | dmikhalev <dmikhalev@yandex-team.ru> | 2022-02-10 16:49:29 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:29 +0300 |
commit | 3b5ee31ed70f690af39dfdec632060610b71b89e (patch) | |
tree | f137aebad00b8064ec63fcd03ebc9fef5121eb9f /util/system | |
parent | 3a0b7cd78a1a8366b3944d8d1e11ef9bb52549bf (diff) | |
download | ydb-3b5ee31ed70f690af39dfdec632060610b71b89e.tar.gz |
Restoring authorship annotation for <dmikhalev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system')
-rw-r--r-- | util/system/context.cpp | 2 | ||||
-rw-r--r-- | util/system/daemon.cpp | 20 | ||||
-rw-r--r-- | util/system/daemon.h | 2 | ||||
-rw-r--r-- | util/system/fs.cpp | 8 |
4 files changed, 16 insertions, 16 deletions
diff --git a/util/system/context.cpp b/util/system/context.cpp index ad99309088..cbf823afee 100644 --- a/util/system/context.cpp +++ b/util/system/context.cpp @@ -227,7 +227,7 @@ TContMachineContext::TContMachineContext() TContMachineContext::TContMachineContext(const TContClosure& c) : Fiber_(CreateFiber(c.Stack.size(), (LPFIBER_START_ROUTINE)ContextTrampoLine, (LPVOID)c.TrampoLine)) , MainFiber_(false) -{ +{ Y_ENSURE(Fiber_, TStringBuf("fiber error")); } diff --git a/util/system/daemon.cpp b/util/system/daemon.cpp index 130e6c8f45..ced376487a 100644 --- a/util/system/daemon.cpp +++ b/util/system/daemon.cpp @@ -1,17 +1,17 @@ #include <util/generic/yexception.h> -#include <cerrno> +#include <cerrno> #include <cstdlib> #include <util/system/info.h> -#if defined(_win_) +#if defined(_win_) #include <io.h> -#else +#else #include <sys/wait.h> #include <unistd.h> #include <fcntl.h> -#endif - +#endif + #include "daemon.h" #ifdef _unix_ @@ -62,18 +62,18 @@ static void CloseFromToExcept(int from, int to, const int* except) { goto dontclose; } } - while (close(s) == -1) { + while (close(s) == -1) { if (errno == EBADF) { - break; + break; } if (errno != EINTR) { ythrow TSystemError() << "close(" << s << ") failed"; } - } + } dontclose:; } -#endif /* _unix_ */ -} +#endif /* _unix_ */ +} bool NDaemonMaker::MakeMeDaemon(ECloseDescriptors cd, EStdIoDescriptors iod, EChDir chd, EParent parent) { (void)cd; diff --git a/util/system/daemon.h b/util/system/daemon.h index b00793b9c9..31689f9cda 100644 --- a/util/system/daemon.h +++ b/util/system/daemon.h @@ -23,5 +23,5 @@ namespace NDaemonMaker { }; bool MakeMeDaemon(ECloseDescriptors cd = closeAll, EStdIoDescriptors iod = openDevNull, EChDir chd = chdirRoot, EParent parent = callExitFromParent); - void CloseFrom(int fd); + void CloseFrom(int fd); } diff --git a/util/system/fs.cpp b/util/system/fs.cpp index d2611a8ccc..c8988d85d6 100644 --- a/util/system/fs.cpp +++ b/util/system/fs.cpp @@ -91,7 +91,7 @@ bool NFs::Rename(const TString& oldPath, const TString& newPath) { return ::rename(oldPath.data(), newPath.data()) == 0; #endif } - + void NFs::HardLinkOrCopy(const TString& existingPath, const TString& newPath) { if (!NFs::HardLink(existingPath, newPath)) { Copy(existingPath, newPath); @@ -101,10 +101,10 @@ void NFs::HardLinkOrCopy(const TString& existingPath, const TString& newPath) { bool NFs::HardLink(const TString& existingPath, const TString& newPath) { #if defined(_win_) return NFsPrivate::WinHardLink(existingPath, newPath); -#elif defined(_unix_) +#elif defined(_unix_) return (0 == link(existingPath.data(), newPath.data())); -#endif -} +#endif +} bool NFs::SymLink(const TString& targetPath, const TString& linkPath) { #if defined(_win_) |