diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-04-21 11:49:10 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-04-22 08:50:39 +0000 |
commit | 0bef62481bc1b91ca360a1b6e2045fa5f52cfb10 (patch) | |
tree | 7e5bee25aa91c0c79a80fae1f047156cbebc2834 /src/plugins/remotelinux/linuxdeviceprocess.h | |
parent | 8372d2199fbee26448c2f7615806a433f50422c5 (diff) |
RemoteLinux: Allow killing processes by ID
Killing every process on the system that happens to have the same name
as the one we've started is error prone and dangerous. We might kill
processes we haven't started and other processes might rename
themselves at runtime so that we don't find them anymore.
The process ID is obtained by outputting it as very first thing on
stdout and then starting the process with "exec", so that it isn't
forked.
Change-Id: Icc51bd1968afc47f4dc42f9e90e5dcbd0b1e40a7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins/remotelinux/linuxdeviceprocess.h')
-rw-r--r-- | src/plugins/remotelinux/linuxdeviceprocess.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/remotelinux/linuxdeviceprocess.h b/src/plugins/remotelinux/linuxdeviceprocess.h index 9948d6ad07..b461024602 100644 --- a/src/plugins/remotelinux/linuxdeviceprocess.h +++ b/src/plugins/remotelinux/linuxdeviceprocess.h @@ -43,12 +43,17 @@ public: // Files to source before executing the command (if they exist). Overrides the default. void setRcFilesToSource(const QStringList &filePaths); + QByteArray readAllStandardOutput() override; + private: QString fullCommandLine(const ProjectExplorer::StandardRunnable &) const override; + qint64 processId() const override; QStringList rcFilesToSource() const; QStringList m_rcFilesToSource; + QByteArray m_processIdString; + qint64 m_processId; }; } // namespace RemoteLinux |