aboutsummaryrefslogtreecommitdiffstats
path: root/util/system
diff options
context:
space:
mode:
authorVasily Gerasimov <UgnineSirdis@gmail.com>2022-02-10 16:49:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:09 +0300
commit6cdc8f140213c595e4ad38bc3d97fcef1146b8c3 (patch)
treef69637041e6fed76ebae0c74ae1fa0c4be6ab5b4 /util/system
parente5d4696304c6689379ac7ce334512404d4b7836c (diff)
downloadydb-6cdc8f140213c595e4ad38bc3d97fcef1146b8c3.tar.gz
Restoring authorship annotation for Vasily Gerasimov <UgnineSirdis@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/system')
-rw-r--r--util/system/execpath.cpp4
-rw-r--r--util/system/file.cpp2
-rw-r--r--util/system/file_ut.cpp2
-rw-r--r--util/system/fs.cpp16
-rw-r--r--util/system/fs.h96
-rw-r--r--util/system/fs_ut.cpp38
-rw-r--r--util/system/fs_win.cpp32
-rw-r--r--util/system/fstat.cpp2
-rw-r--r--util/system/fstat_ut.cpp2
-rw-r--r--util/system/shellcommand.cpp6
-rw-r--r--util/system/shellcommand_ut.cpp66
-rw-r--r--util/system/tempfile.h2
12 files changed, 134 insertions, 134 deletions
diff --git a/util/system/execpath.cpp b/util/system/execpath.cpp
index 33198af58b..1c91cd1902 100644
--- a/util/system/execpath.cpp
+++ b/util/system/execpath.cpp
@@ -64,7 +64,7 @@ static inline TString FreeBSDGetExecPath() {
* https://www.freebsd.org/cgi/man.cgi?query=procfs&sektion=5&format=html
*/
TString path("/proc/curproc/file");
- return NFs::ReadLink(path);
+ return NFs::ReadLink(path);
} else {
return TString();
}
@@ -129,7 +129,7 @@ static TString GetExecPathImpl() {
}
#elif defined(_linux_) || defined(_cygwin_)
TString path("/proc/self/exe");
- return NFs::ReadLink(path);
+ return NFs::ReadLink(path);
// TODO(yoda): check if the filename ends with " (deleted)"
#elif defined(_freebsd_)
TString execPath = FreeBSDGetExecPath();
diff --git a/util/system/file.cpp b/util/system/file.cpp
index 4a261d020c..6bf3ae81fd 100644
--- a/util/system/file.cpp
+++ b/util/system/file.cpp
@@ -134,7 +134,7 @@ TFileHandle::TFileHandle(const TString& fName, EOpenMode oMode) noexcept {
attrMode |= /*FILE_FLAG_NO_BUFFERING |*/ FILE_FLAG_WRITE_THROUGH;
}
- Fd_ = NFsPrivate::CreateFileWithUtf8Name(fName, faMode, shMode, fcMode, attrMode, inheritHandle);
+ Fd_ = NFsPrivate::CreateFileWithUtf8Name(fName, faMode, shMode, fcMode, attrMode, inheritHandle);
if ((oMode & ::ForAppend) && (Fd_ != INVALID_FHANDLE)) {
::SetFilePointer(Fd_, 0, 0, FILE_END);
diff --git a/util/system/file_ut.cpp b/util/system/file_ut.cpp
index 941e6a50f3..83e6eb9c0d 100644
--- a/util/system/file_ut.cpp
+++ b/util/system/file_ut.cpp
@@ -210,7 +210,7 @@ void TFileTest::TestLocale() {
UNIT_ASSERT_VALUES_EQUAL(f.GetName(), "Имя.txt");
UNIT_ASSERT_VALUES_EQUAL(f.GetLength(), 0);
f.Close();
- UNIT_ASSERT(NFs::Remove("Имя.txt"));
+ UNIT_ASSERT(NFs::Remove("Имя.txt"));
#ifdef _unix_
setlocale(LC_CTYPE, loc);
#endif
diff --git a/util/system/fs.cpp b/util/system/fs.cpp
index d2611a8ccc..e62be57d81 100644
--- a/util/system/fs.cpp
+++ b/util/system/fs.cpp
@@ -18,7 +18,7 @@
bool NFs::Remove(const TString& path) {
#if defined(_win_)
- return NFsPrivate::WinRemove(path);
+ return NFsPrivate::WinRemove(path);
#else
return ::remove(path.data()) == 0;
#endif
@@ -86,21 +86,21 @@ bool NFs::MakeDirectoryRecursive(const TString& path, EFilePermissions mode, boo
bool NFs::Rename(const TString& oldPath, const TString& newPath) {
#if defined(_win_)
- return NFsPrivate::WinRename(oldPath, newPath);
+ return NFsPrivate::WinRename(oldPath, newPath);
#else
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);
+ if (!NFs::HardLink(existingPath, newPath)) {
+ Copy(existingPath, newPath);
}
}
bool NFs::HardLink(const TString& existingPath, const TString& newPath) {
#if defined(_win_)
- return NFsPrivate::WinHardLink(existingPath, newPath);
+ return NFsPrivate::WinHardLink(existingPath, newPath);
#elif defined(_unix_)
return (0 == link(existingPath.data(), newPath.data()));
#endif
@@ -108,7 +108,7 @@ bool NFs::HardLink(const TString& existingPath, const TString& newPath) {
bool NFs::SymLink(const TString& targetPath, const TString& linkPath) {
#if defined(_win_)
- return NFsPrivate::WinSymLink(targetPath, linkPath);
+ return NFsPrivate::WinSymLink(targetPath, linkPath);
#elif defined(_unix_)
return 0 == symlink(targetPath.data(), linkPath.data());
#endif
@@ -116,7 +116,7 @@ bool NFs::SymLink(const TString& targetPath, const TString& linkPath) {
TString NFs::ReadLink(const TString& path) {
#if defined(_win_)
- return NFsPrivate::WinReadLink(path);
+ return NFsPrivate::WinReadLink(path);
#elif defined(_unix_)
TTempBuf buf;
while (true) {
@@ -148,7 +148,7 @@ void NFs::Copy(const TString& existingPath, const TString& newPath) {
bool NFs::Exists(const TString& path) {
#if defined(_win_)
- return NFsPrivate::WinExists(path);
+ return NFsPrivate::WinExists(path);
#elif defined(_unix_)
return access(path.data(), F_OK) == 0;
#endif
diff --git a/util/system/fs.h b/util/system/fs.h
index 237daf2d2d..11161c3a79 100644
--- a/util/system/fs.h
+++ b/util/system/fs.h
@@ -4,7 +4,7 @@
#include <util/generic/string.h>
#include <util/generic/yexception.h>
-namespace NFs {
+namespace NFs {
enum EFilePermission {
FP_ALL_EXEC = 01,
FP_ALL_WRITE = 02,
@@ -23,11 +23,11 @@ namespace NFs {
Y_DECLARE_FLAGS(EFilePermissions, EFilePermission);
- /// Remove a file or empty directory
- ///
- /// @param[in] path Path to file or directory
- /// @returns true on success or false otherwise
- /// LastSystemError() is set in case of failure
+ /// Remove a file or empty directory
+ ///
+ /// @param[in] path Path to file or directory
+ /// @returns true on success or false otherwise
+ /// LastSystemError() is set in case of failure
bool Remove(const TString& path);
/// Remove a file or directory with contents
@@ -77,54 +77,54 @@ namespace NFs {
return MakeDirectoryRecursive(path, FP_COMMON_FILE, false);
}
- /// Rename a file or directory.
- /// Removes newPath if it exists
- ///
- /// @param[in] oldPath Path to file or directory to rename
- /// @param[in] newPath New path of file or directory
- /// @returns true on success or false otherwise
- /// LastSystemError() is set in case of failure
+ /// Rename a file or directory.
+ /// Removes newPath if it exists
+ ///
+ /// @param[in] oldPath Path to file or directory to rename
+ /// @param[in] newPath New path of file or directory
+ /// @returns true on success or false otherwise
+ /// LastSystemError() is set in case of failure
bool Rename(const TString& oldPath, const TString& newPath);
-
- /// Creates a new directory entry for a file
- /// or creates a new one with the same content
- ///
- /// @param[in] existingPath Path to an existing file
- /// @param[in] newPath New path of file
+
+ /// Creates a new directory entry for a file
+ /// or creates a new one with the same content
+ ///
+ /// @param[in] existingPath Path to an existing file
+ /// @param[in] newPath New path of file
void HardLinkOrCopy(const TString& existingPath, const TString& newPath);
-
- /// Creates a new directory entry for a file
- ///
- /// @param[in] existingPath Path to an existing file
- /// @param[in] newPath New path of file
- /// @returns true if new link was created or false otherwise
- /// LastSystemError() is set in case of failure
+
+ /// Creates a new directory entry for a file
+ ///
+ /// @param[in] existingPath Path to an existing file
+ /// @param[in] newPath New path of file
+ /// @returns true if new link was created or false otherwise
+ /// LastSystemError() is set in case of failure
bool HardLink(const TString& existingPath, const TString& newPath);
-
- /// Creates a symlink to a file
- ///
- /// @param[in] targetPath Path to a target file
- /// @param[in] linkPath Path of symlink
- /// @returns true if new link was created or false otherwise
- /// LastSystemError() is set in case of failure
+
+ /// Creates a symlink to a file
+ ///
+ /// @param[in] targetPath Path to a target file
+ /// @param[in] linkPath Path of symlink
+ /// @returns true if new link was created or false otherwise
+ /// LastSystemError() is set in case of failure
bool SymLink(const TString& targetPath, const TString& linkPath);
-
- /// Reads value of a symbolic link
- ///
- /// @param[in] path Path to a symlink
- /// @returns File path that a symlink points to
+
+ /// Reads value of a symbolic link
+ ///
+ /// @param[in] path Path to a symlink
+ /// @returns File path that a symlink points to
TString ReadLink(const TString& path);
-
- /// Append contents of a file to a new file
- ///
- /// @param[in] dstPath Path to a destination file
- /// @param[in] srcPath Path to a source file
+
+ /// Append contents of a file to a new file
+ ///
+ /// @param[in] dstPath Path to a destination file
+ /// @param[in] srcPath Path to a source file
void Cat(const TString& dstPath, const TString& srcPath);
-
- /// Copy contents of a file to a new file
- ///
- /// @param[in] existingPath Path to an existing file
- /// @param[in] newPath New path of file
+
+ /// Copy contents of a file to a new file
+ ///
+ /// @param[in] existingPath Path to an existing file
+ /// @param[in] newPath New path of file
void Copy(const TString& existingPath, const TString& newPath);
/// Returns path to the current working directory
diff --git a/util/system/fs_ut.cpp b/util/system/fs_ut.cpp
index de071ebf55..7739866acb 100644
--- a/util/system/fs_ut.cpp
+++ b/util/system/fs_ut.cpp
@@ -6,7 +6,7 @@
#include "sysstat.h"
#include "fstat.h"
#include <util/folder/dirut.h>
-#include <util/folder/path.h>
+#include <util/folder/path.h>
//WARNING: on windows the test must be run with administative rules
@@ -114,7 +114,7 @@ void RunRenameTest(TFsPath src, TFsPath dst) {
file.Write("123", 3);
}
- UNIT_ASSERT(NFs::Rename(src, dst));
+ UNIT_ASSERT(NFs::Rename(src, dst));
UNIT_ASSERT(NFs::Exists(dst));
UNIT_ASSERT(!NFs::Exists(src));
@@ -128,7 +128,7 @@ void RunRenameTest(TFsPath src, TFsPath dst) {
TFile file(dir1 / src, CreateNew | WrOnly);
file.Write("123", 3);
}
- UNIT_ASSERT(NFs::Rename(dir1, dir2));
+ UNIT_ASSERT(NFs::Rename(dir1, dir2));
UNIT_ASSERT(NFs::Exists(dir2 / src));
UNIT_ASSERT(!NFs::Exists(dir1));
@@ -137,11 +137,11 @@ void RunRenameTest(TFsPath src, TFsPath dst) {
UNIT_ASSERT_VALUES_EQUAL(file.GetLength(), 3);
}
- UNIT_ASSERT(!NFs::Remove(src));
- UNIT_ASSERT(NFs::Remove(dst));
- UNIT_ASSERT(!NFs::Remove(dir1));
- UNIT_ASSERT(NFs::Remove(dir2 / src));
- UNIT_ASSERT(NFs::Remove(dir2));
+ UNIT_ASSERT(!NFs::Remove(src));
+ UNIT_ASSERT(NFs::Remove(dst));
+ UNIT_ASSERT(!NFs::Remove(dir1));
+ UNIT_ASSERT(NFs::Remove(dir2 / src));
+ UNIT_ASSERT(NFs::Remove(dir2));
}
void TFsTest::TestRename() {
@@ -182,8 +182,8 @@ static void RunHardlinkTest(const TFsPath& src, const TFsPath& dst) {
UNIT_ASSERT_VALUES_EQUAL(file.GetLength(), 5);
}
- UNIT_ASSERT(NFs::Remove(dst));
- UNIT_ASSERT(NFs::Remove(src));
+ UNIT_ASSERT(NFs::Remove(dst));
+ UNIT_ASSERT(NFs::Remove(src));
}
void TFsTest::TestHardlink() {
@@ -260,20 +260,20 @@ static void RunSymLinkTest(TString fileLocalName, TString symLinkName) {
UNIT_ASSERT(fs.IsSymlink());
}
- UNIT_ASSERT(NFs::Remove(symLinkName));
+ UNIT_ASSERT(NFs::Remove(symLinkName));
UNIT_ASSERT(NFs::Exists(srcFile));
- UNIT_ASSERT(NFs::Remove(linkD1));
+ UNIT_ASSERT(NFs::Remove(linkD1));
UNIT_ASSERT(NFs::Exists(srcFile));
- UNIT_ASSERT(!NFs::Remove(subDir));
+ UNIT_ASSERT(!NFs::Remove(subDir));
- UNIT_ASSERT(NFs::Remove(srcFile));
- UNIT_ASSERT(NFs::Remove(linkD2));
- UNIT_ASSERT(NFs::Remove(dangling));
- UNIT_ASSERT(NFs::Remove(subsubDir1));
- UNIT_ASSERT(NFs::Remove(subsubDir2));
- UNIT_ASSERT(NFs::Remove(subDir));
+ UNIT_ASSERT(NFs::Remove(srcFile));
+ UNIT_ASSERT(NFs::Remove(linkD2));
+ UNIT_ASSERT(NFs::Remove(dangling));
+ UNIT_ASSERT(NFs::Remove(subsubDir1));
+ UNIT_ASSERT(NFs::Remove(subsubDir2));
+ UNIT_ASSERT(NFs::Remove(subDir));
}
void TFsTest::TestSymlink() {
diff --git a/util/system/fs_win.cpp b/util/system/fs_win.cpp
index a410ccac06..020d3ca453 100644
--- a/util/system/fs_win.cpp
+++ b/util/system/fs_win.cpp
@@ -8,7 +8,7 @@
#include <winioctl.h>
-namespace NFsPrivate {
+namespace NFsPrivate {
static LPCWSTR UTF8ToWCHAR(const TStringBuf str, TUtf16String& wstr) {
wstr.resize(str.size());
size_t written = 0;
@@ -41,31 +41,31 @@ namespace NFsPrivate {
bool WinRename(const TString& oldPath, const TString& newPath) {
TUtf16String op, np;
- LPCWSTR opPtr = UTF8ToWCHAR(oldPath, op);
- LPCWSTR npPtr = UTF8ToWCHAR(newPath, np);
+ LPCWSTR opPtr = UTF8ToWCHAR(oldPath, op);
+ LPCWSTR npPtr = UTF8ToWCHAR(newPath, np);
if (!opPtr || !npPtr) {
::SetLastError(ERROR_INVALID_NAME);
- return false;
+ return false;
}
- return MoveFileExW(opPtr, npPtr, MOVEFILE_REPLACE_EXISTING) != 0;
+ return MoveFileExW(opPtr, npPtr, MOVEFILE_REPLACE_EXISTING) != 0;
}
bool WinRemove(const TString& path) {
TUtf16String wstr;
- LPCWSTR wname = UTF8ToWCHAR(path, wstr);
+ LPCWSTR wname = UTF8ToWCHAR(path, wstr);
if (!wname) {
::SetLastError(ERROR_INVALID_NAME);
- return false;
+ return false;
}
WIN32_FILE_ATTRIBUTE_DATA fad;
if (::GetFileAttributesExW(wname, GetFileExInfoStandard, &fad)) {
if (fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- return ::RemoveDirectoryW(wname) != 0;
- return ::DeleteFileW(wname) != 0;
+ return ::RemoveDirectoryW(wname) != 0;
+ return ::DeleteFileW(wname) != 0;
}
- return false;
+ return false;
}
bool WinSymLink(const TString& targetName, const TString& linkName) {
@@ -78,7 +78,7 @@ namespace NFsPrivate {
TUtf16String tstr;
LPCWSTR wname = UTF8ToWCHAR(tName, tstr);
TUtf16String lstr;
- LPCWSTR lname = UTF8ToWCHAR(linkName, lstr);
+ LPCWSTR lname = UTF8ToWCHAR(linkName, lstr);
// we can't create a dangling link to a dir in this way
ui32 attr = ::GetFileAttributesW(wname);
@@ -103,8 +103,8 @@ namespace NFsPrivate {
bool WinHardLink(const TString& existingPath, const TString& newPath) {
TUtf16String ep, np;
- LPCWSTR epPtr = UTF8ToWCHAR(existingPath, ep);
- LPCWSTR npPtr = UTF8ToWCHAR(newPath, np);
+ LPCWSTR epPtr = UTF8ToWCHAR(existingPath, ep);
+ LPCWSTR npPtr = UTF8ToWCHAR(newPath, np);
if (!epPtr || !npPtr) {
::SetLastError(ERROR_INVALID_NAME);
return false;
@@ -115,7 +115,7 @@ namespace NFsPrivate {
bool WinExists(const TString& path) {
TUtf16String buf;
- LPCWSTR ptr = UTF8ToWCHAR(path, buf);
+ LPCWSTR ptr = UTF8ToWCHAR(path, buf);
return ::GetFileAttributesW(ptr) != INVALID_FILE_ATTRIBUTES;
}
@@ -181,7 +181,7 @@ namespace NFsPrivate {
// the end of edited part of <Ntifs.h>
TString WinReadLink(const TString& name) {
- TFileHandle h = CreateFileWithUtf8Name(name, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING,
+ TFileHandle h = CreateFileWithUtf8Name(name, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING,
FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, true);
TTempBuf buf;
while (true) {
@@ -204,7 +204,7 @@ namespace NFsPrivate {
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
buf = TTempBuf(buf.Size() * 2);
} else {
- ythrow yexception() << "can't read link " << name;
+ ythrow yexception() << "can't read link " << name;
}
}
}
diff --git a/util/system/fstat.cpp b/util/system/fstat.cpp
index 81e98cbc6b..5db39741ae 100644
--- a/util/system/fstat.cpp
+++ b/util/system/fstat.cpp
@@ -84,7 +84,7 @@ static bool GetStatByHandle(TSystemFStat& fs, FHANDLE f) {
static bool GetStatByName(TSystemFStat& fs, const char* fileName, bool nofollow) {
#ifdef _win_
- TFileHandle h = NFsPrivate::CreateFileWithUtf8Name(fileName, FILE_READ_ATTRIBUTES | FILE_READ_EA, FILE_SHARE_READ | FILE_SHARE_WRITE,
+ TFileHandle h = NFsPrivate::CreateFileWithUtf8Name(fileName, FILE_READ_ATTRIBUTES | FILE_READ_EA, FILE_SHARE_READ | FILE_SHARE_WRITE,
OPEN_EXISTING,
(nofollow ? FILE_FLAG_OPEN_REPARSE_POINT : 0) | FILE_FLAG_BACKUP_SEMANTICS, true);
if (!h.IsOpen()) {
diff --git a/util/system/fstat_ut.cpp b/util/system/fstat_ut.cpp
index 160ecd936e..938e017839 100644
--- a/util/system/fstat_ut.cpp
+++ b/util/system/fstat_ut.cpp
@@ -53,7 +53,7 @@ Y_UNIT_TEST_SUITE(TestFileStat) {
UNIT_ASSERT(fs.IsDir());
UNIT_ASSERT(!fs.IsSymlink());
//UNIT_ASSERT(fs.Size == 0); // it fails under unix
- UNIT_ASSERT(NFs::Remove("tmpd"));
+ UNIT_ASSERT(NFs::Remove("tmpd"));
fs = TFileStat("tmpd");
UNIT_ASSERT(!fs.IsFile());
UNIT_ASSERT(!fs.IsDir());
diff --git a/util/system/shellcommand.cpp b/util/system/shellcommand.cpp
index b1989b5c8c..47eefde0cd 100644
--- a/util/system/shellcommand.cpp
+++ b/util/system/shellcommand.cpp
@@ -218,7 +218,7 @@ private:
bool QuoteArguments = false;
bool DetachSession = false;
bool CloseStreams = false;
- TAtomic ShouldCloseInput;
+ TAtomic ShouldCloseInput;
TShellCommandOptions::EHandleMode InputMode = TShellCommandOptions::HANDLE_STREAM;
TShellCommandOptions::EHandleMode OutputMode = TShellCommandOptions::HANDLE_STREAM;
TShellCommandOptions::EHandleMode ErrorMode = TShellCommandOptions::HANDLE_STREAM;
@@ -415,7 +415,7 @@ public:
}
inline void CloseInput() {
- AtomicSet(ShouldCloseInput, true);
+ AtomicSet(ShouldCloseInput, true);
}
inline static bool TerminateIsRequired(void* processInfo) {
@@ -1035,7 +1035,7 @@ void TShellCommand::TImpl::Communicate(TProcessInfo* pi) {
if (!bytesToWrite) {
bytesToWrite = input->Read(inputBuffer.Data(), inputBuffer.Capacity());
if (bytesToWrite == 0) {
- if (AtomicGet(pi->Parent->ShouldCloseInput)) {
+ if (AtomicGet(pi->Parent->ShouldCloseInput)) {
input = nullptr;
}
continue;
diff --git a/util/system/shellcommand_ut.cpp b/util/system/shellcommand_ut.cpp
index 9d849279d2..283bbd9283 100644
--- a/util/system/shellcommand_ut.cpp
+++ b/util/system/shellcommand_ut.cpp
@@ -1,16 +1,16 @@
#include "shellcommand.h"
-#include "compat.h"
+#include "compat.h"
#include "defaults.h"
-#include "fs.h"
+#include "fs.h"
#include "sigset.h"
-#include "spinlock.h"
-
+#include "spinlock.h"
+
#include <library/cpp/testing/unittest/env.h>
#include <library/cpp/testing/unittest/registar.h>
-
-#include <util/folder/dirut.h>
-#include <util/random/random.h>
+
+#include <util/folder/dirut.h>
+#include <util/random/random.h>
#include <util/stream/file.h>
#include <util/stream/str.h>
#include <util/stream/mem.h>
@@ -28,37 +28,37 @@ const size_t textSize = 20000;
#endif
class TGuardedStringStream: public IInputStream, public IOutputStream {
-public:
- TGuardedStringStream() {
+public:
+ TGuardedStringStream() {
Stream_.Reserve(100);
- }
-
+ }
+
TString Str() const {
with_lock (Lock_) {
return Stream_.Str();
- }
+ }
return TString(); // line for compiler
- }
-
-protected:
- size_t DoRead(void* buf, size_t len) override {
+ }
+
+protected:
+ size_t DoRead(void* buf, size_t len) override {
with_lock (Lock_) {
return Stream_.Read(buf, len);
- }
- return 0; // line for compiler
- }
-
- void DoWrite(const void* buf, size_t len) override {
+ }
+ return 0; // line for compiler
+ }
+
+ void DoWrite(const void* buf, size_t len) override {
with_lock (Lock_) {
return Stream_.Write(buf, len);
- }
- }
-
-private:
+ }
+ }
+
+private:
TAdaptiveLock Lock_;
TStringStream Stream_;
-};
-
+};
+
Y_UNIT_TEST_SUITE(TShellQuoteTest) {
Y_UNIT_TEST(TestQuoteArg) {
TString cmd;
@@ -232,9 +232,9 @@ Y_UNIT_TEST_SUITE(TShellCommandTest) {
options.SetClearSignalMask(true);
options.SetCloseAllFdsOnExec(true);
options.SetCloseInput(false);
- TGuardedStringStream write;
+ TGuardedStringStream write;
options.SetInputStream(&write);
- TGuardedStringStream read;
+ TGuardedStringStream read;
options.SetOutputStream(&read);
options.SetUseShell(true);
@@ -283,12 +283,12 @@ Y_UNIT_TEST_SUITE(TShellCommandTest) {
Y_UNIT_TEST(TestInterruptSimple) {
TShellCommandOptions options;
options.SetAsync(true);
- options.SetCloseInput(false);
- TGuardedStringStream write;
- options.SetInputStream(&write); // set input stream that will be waited by cat
+ options.SetCloseInput(false);
+ TGuardedStringStream write;
+ options.SetInputStream(&write); // set input stream that will be waited by cat
TShellCommand cmd(catCommand, options);
cmd.Run();
- sleep(1);
+ sleep(1);
UNIT_ASSERT(TShellCommand::SHELL_RUNNING == cmd.GetStatus());
cmd.Terminate();
cmd.Wait();
diff --git a/util/system/tempfile.h b/util/system/tempfile.h
index de249c129d..6fd736ad7b 100644
--- a/util/system/tempfile.h
+++ b/util/system/tempfile.h
@@ -14,7 +14,7 @@ public:
}
inline ~TTempFile() {
- NFs::Remove(Name());
+ NFs::Remove(Name());
}
inline const TString& Name() const noexcept {