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.
Currently, there is an issue where 'exec [program]' results in tab
titles not being updated and not showing the process name as [program].
This is probably due to how 'exec' does not result in any change in
pid and simply replaces the current process image with a different one.
Due to a lack of pid changes, Session::updateSessionProcessInfo will not
call ProcessInfo::newInstance, thus not updating the ProcessInfo::_name.
This new change periodically checks and updates the _name of ProcessInfo
through ProcessInfo::readProcessName, which is called by
ProcessInfo::update.
BUG: 391128
kpty code is (as of now) unix-only, so konsole as a whole cannot
possibly work on windows (without a thick emulation layer). therefore,
remove the pointless #ifdefs that only reduce the code's legibility.