summaryrefslogtreecommitdiffstats
path: root/util/system/shellcommand.h
diff options
context:
space:
mode:
authorVlad Yaroslavlev <[email protected]>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /util/system/shellcommand.h
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
Restoring authorship annotation for Vlad Yaroslavlev <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/system/shellcommand.h')
-rw-r--r--util/system/shellcommand.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/util/system/shellcommand.h b/util/system/shellcommand.h
index 8730627fe5b..c2e7a4701cb 100644
--- a/util/system/shellcommand.h
+++ b/util/system/shellcommand.h
@@ -1,7 +1,7 @@
#pragma once
#include <util/generic/noncopyable.h>
-#include <util/generic/string.h>
+#include <util/generic/string.h>
#include <util/generic/list.h>
#include <util/generic/hash.h>
#include <util/generic/strbuf.h>
@@ -17,9 +17,9 @@
class TShellCommandOptions {
public:
struct TUserOptions {
- TString Name;
+ TString Name;
#if defined(_win_)
- TString Password;
+ TString Password;
#endif
#if defined(_unix_)
/**
@@ -38,7 +38,7 @@ public:
};
public:
- inline TShellCommandOptions() noexcept
+ inline TShellCommandOptions() noexcept
: ClearSignalMask(false)
, CloseAllFdsOnExec(false)
, AsyncMode(false)
@@ -59,7 +59,7 @@ public:
{
}
- inline TShellCommandOptions& SetNice(int value) noexcept {
+ inline TShellCommandOptions& SetNice(int value) noexcept {
Nice = value;
return *this;
@@ -318,7 +318,7 @@ public:
IOutputStream* OutputStream;
IOutputStream* ErrorStream;
TUserOptions User;
- THashMap<TString, TString> Environment;
+ THashMap<TString, TString> Environment;
int Nice = 0;
static const size_t DefaultSyncPollDelay = 1000; // ms
@@ -351,10 +351,10 @@ public:
* @param options execution options
* @todo store entire options structure
*/
- TShellCommand(const TStringBuf cmd, const TList<TString>& args, const TShellCommandOptions& options = TShellCommandOptions(),
- const TString& workdir = TString());
- TShellCommand(const TStringBuf cmd, const TShellCommandOptions& options = TShellCommandOptions(), const TString& workdir = TString());
- ~TShellCommand();
+ TShellCommand(const TStringBuf cmd, const TList<TString>& args, const TShellCommandOptions& options = TShellCommandOptions(),
+ const TString& workdir = TString());
+ TShellCommand(const TStringBuf cmd, const TShellCommandOptions& options = TShellCommandOptions(), const TString& workdir = TString());
+ ~TShellCommand();
public:
/**
@@ -372,7 +372,7 @@ public:
*
* @return collected output
*/
- const TString& GetOutput() const;
+ const TString& GetOutput() const;
/**
* @brief return the collected error output from the command.
@@ -380,7 +380,7 @@ public:
*
* @return collected error output
*/
- const TString& GetError() const;
+ const TString& GetError() const;
/**
* @brief return the internal error occured while watching
@@ -389,7 +389,7 @@ public:
*
* @return error text
*/
- const TString& GetInternalError() const;
+ const TString& GetInternalError() const;
/**
* @brief get current status of command execution
@@ -476,10 +476,10 @@ private:
};
/// Appends to dst: quoted arg
-void ShellQuoteArg(TString& dst, TStringBuf arg);
+void ShellQuoteArg(TString& dst, TStringBuf arg);
/// Appends to dst: space, quoted arg
-void ShellQuoteArgSp(TString& dst, TStringBuf arg);
+void ShellQuoteArgSp(TString& dst, TStringBuf arg);
/// Returns true if arg should be quoted
bool ArgNeedsQuotes(TStringBuf arg) noexcept;