Calls ProcessInfo::readArguments periodically on ProcessInfo::update

When ssh is run via 'exec ssh [ssh arguments]', ProcessInfo::_arguments
is not updated since ProcessInfo::readArguments is only called once when
the process is started. Thus, SSHProcessInfo::SSHProcessInfo will have
soft errors since it relies heavily on reading ProcessInfo::_arguments
which are outdated. A solution is to call ProcessInfo::clearArguments
followed by ProcessInfo::readArguments whenever ProcessInfo::update
is called if there is a change in process name.
This commit is contained in:
Theodore Wang
2023-09-12 20:31:13 +08:00
committed by Méven Car
parent 6e7decd4a0
commit 1b50142053
6 changed files with 50 additions and 38 deletions

View File

@@ -27,6 +27,11 @@ bool NullProcessInfo::readCurrentDir(int /*pid*/)
return false;
}
bool NullProcessInfo::readArguments(int /*pid*/)
{
return false;
}
void NullProcessInfo::readUserName()
{
}