aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/shellcommand.cpp
diff options
context:
space:
mode:
authorvlad-savinov <vlad-savinov@yandex-team.ru>2022-02-10 16:51:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:51:46 +0300
commitaa109021468e8848c0c4f46894b8cc74d390d4c3 (patch)
tree04fb88139bef69d6d03cbe56dfae1ab64d3f95e5 /util/system/shellcommand.cpp
parentcf6e6821eefccdbf1103566edb4a651fe0388df7 (diff)
downloadydb-aa109021468e8848c0c4f46894b8cc74d390d4c3.tar.gz
Restoring authorship annotation for <vlad-savinov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/shellcommand.cpp')
-rw-r--r--util/system/shellcommand.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/shellcommand.cpp b/util/system/shellcommand.cpp
index b1989b5c8c..6dae056736 100644
--- a/util/system/shellcommand.cpp
+++ b/util/system/shellcommand.cpp
@@ -226,7 +226,7 @@ private:
TShellCommandOptions::TUserOptions User;
THashMap<TString, TString> Environment;
int Nice = 0;
- std::function<void()> FuncAfterFork = {};
+ std::function<void()> FuncAfterFork = {};
struct TProcessInfo {
TImpl* Parent;
@@ -274,7 +274,7 @@ private:
};
#if defined(_unix_)
- void OnFork(TPipes& pipes, sigset_t oldmask, char* const* argv, char* const* envp, const std::function<void()>& afterFork) const;
+ void OnFork(TPipes& pipes, sigset_t oldmask, char* const* argv, char* const* envp, const std::function<void()>& afterFork) const;
#else
void StartProcess(TPipes& pipes);
#endif
@@ -306,7 +306,7 @@ public:
, User(options.User)
, Environment(options.Environment)
, Nice(options.Nice)
- , FuncAfterFork(options.FuncAfterFork)
+ , FuncAfterFork(options.FuncAfterFork)
{
if (InputStream) {
// TODO change usages to call SetInputStream instead of directly assigning to InputStream
@@ -665,7 +665,7 @@ TString TShellCommand::TImpl::GetQuotedCommand() const {
}
#if defined(_unix_)
-void TShellCommand::TImpl::OnFork(TPipes& pipes, sigset_t oldmask, char* const* argv, char* const* envp, const std::function<void()>& afterFork) const {
+void TShellCommand::TImpl::OnFork(TPipes& pipes, sigset_t oldmask, char* const* argv, char* const* envp, const std::function<void()>& afterFork) const {
try {
if (DetachSession) {
setsid();
@@ -734,9 +734,9 @@ void TShellCommand::TImpl::OnFork(TPipes& pipes, sigset_t oldmask, char* const*
// Don't verify Nice() call - it does not work properly with WSL https://github.com/Microsoft/WSL/issues/1838
::Nice(Nice);
}
- if (afterFork) {
- afterFork();
- }
+ if (afterFork) {
+ afterFork();
+ }
if (envp == nullptr) {
execvp(argv[0], argv);
@@ -824,9 +824,9 @@ void TShellCommand::TImpl::Run() {
ythrow TSystemError() << "Cannot fork";
} else if (pid == 0) { // child
if (envp.size() != 0) {
- OnFork(pipes, oldmask, qargv.data(), envp.data(), FuncAfterFork);
+ OnFork(pipes, oldmask, qargv.data(), envp.data(), FuncAfterFork);
} else {
- OnFork(pipes, oldmask, qargv.data(), nullptr, FuncAfterFork);
+ OnFork(pipes, oldmask, qargv.data(), nullptr, FuncAfterFork);
}
} else { // parent
// restore signal mask