Fix SFTP unmount
Review Request #129993 - Created March 7, 2017 and submitted
The destructor of Mounter says it doesn't call unmount because it will crash.
I tracked down the root cause of that. In unmount(), m_proc is set to nullptr before the process is killed. And Stderr/StdoutReadReady is triggered after that. So in the signal handler there's a nullptr dereference.
In this patch I take some actions to make sure the process is shutdown properly.
|You can use connect(m_proc, &KProcess::readyReadStandardError, this, [this] it will be safe (when kprocess or this die it will be disconnected)||Anthony Fieroni|
|You can remove this code, kill will terminate process with SIGKILL, deleteLater can be used without branching.||Anthony Fieroni|
|m_proc needs to be destroyed either way... the other branch is not doing so. I'm a bit concerned about how ...||Aleix Pol Gonzalez|