aboutsummaryrefslogtreecommitdiffstats
path: root/fastos
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-09-01 19:41:13 +0000
committerArne Juul <arnej@verizonmedia.com>2021-09-01 19:41:13 +0000
commitc0df602eae1b633a5172ffbf92e19116ed08f9d9 (patch)
treeb3cd6ac91f4777fb1e9a134fa6984be165dc12fa /fastos
parent530c5ce338ad8f9cc13dbaae3911e8851303503c (diff)
remove unused code
* there is no code setting _hasProxiedChildren to true, so PollReapProxiedChildren() can never be called.
Diffstat (limited to 'fastos')
-rw-r--r--fastos/src/vespa/fastos/unix_process.cpp34
-rw-r--r--fastos/src/vespa/fastos/unix_process.h2
2 files changed, 0 insertions, 36 deletions
diff --git a/fastos/src/vespa/fastos/unix_process.cpp b/fastos/src/vespa/fastos/unix_process.cpp
index 3dc9e0315e9..c1692b4e76a 100644
--- a/fastos/src/vespa/fastos/unix_process.cpp
+++ b/fastos/src/vespa/fastos/unix_process.cpp
@@ -1325,7 +1325,6 @@ FastOS_UNIX_ProcessStarter::FastOS_UNIX_ProcessStarter (FastOS_ApplicationInterf
_mainSocket(-1),
_starterSocketDescr(-1),
_mainSocketDescr(-1),
- _hasProxiedChildren(false),
_closedProxyProcessFiles(false),
_hasDetachedProcess(false),
_hasDirectChildren(false)
@@ -1557,37 +1556,6 @@ FastOS_UNIX_ProcessStarter::PollReapDirectChildren()
}
-void
-FastOS_UNIX_ProcessStarter::PollReapProxiedChildren()
-{
- // Ask our process starter to report dead processes
- WriteInt(_mainSocket, FastOS_UNIX_ProcessStarter::CODE_WAIT);
-
- int numDeadProcesses;
- ReadBytes(_mainSocket, &numDeadProcesses, sizeof(int));
-
- for(int i=0; i<numDeadProcesses; i++)
- {
- pid_t deadProcess;
- int returnCode;
-
- ReadBytes(_mainSocket, &deadProcess, sizeof(pid_t));
- ReadBytes(_mainSocket, &returnCode, sizeof(int));
-
- FastOS_ProcessInterface *node;
- for(node = _app->GetProcessList(); node != nullptr; node = node->_next)
- {
- FastOS_UNIX_Process *xproc = static_cast<FastOS_UNIX_Process *>(node);
-
- if (xproc->GetProcessId() == static_cast<unsigned int>(deadProcess))
- {
- xproc->DeathNotification(returnCode);
- }
- }
- }
-}
-
-
bool
FastOS_UNIX_ProcessStarter::Wait(FastOS_UNIX_Process *process,
int timeOutSeconds,
@@ -1607,8 +1575,6 @@ FastOS_UNIX_ProcessStarter::Wait(FastOS_UNIX_Process *process,
auto guard = process->_app->getProcessGuard();
if (_hasDirectChildren) PollReapDirectChildren();
-
- if (_hasProxiedChildren) PollReapProxiedChildren();
}
if (process->GetDeathFlag()) {
diff --git a/fastos/src/vespa/fastos/unix_process.h b/fastos/src/vespa/fastos/unix_process.h
index 0f641706bb5..27e8c175d44 100644
--- a/fastos/src/vespa/fastos/unix_process.h
+++ b/fastos/src/vespa/fastos/unix_process.h
@@ -187,7 +187,6 @@ protected:
int _mainSocket;
int _starterSocketDescr;
int _mainSocketDescr;
- bool _hasProxiedChildren;
bool _closedProxyProcessFiles;
bool _hasDetachedProcess;
bool _hasDirectChildren;
@@ -205,7 +204,6 @@ protected:
void AddChildProcess (FastOS_UNIX_RealProcess *node);
void RemoveChildProcess (FastOS_UNIX_RealProcess *node);
- void PollReapProxiedChildren();
char **CopyEnvironmentVariables();
static void FreeEnvironmentVariables(char **env);
void PollReapDirectChildren();