Fix SFTP unmount

Review Request #129993 - Created March 7, 2017 and submitted

Yuxuan Shui

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.



  • 3
  • 1
  • 1
  • 5
Description From Last Updated
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 Anthony Fieroni
You can remove this code, kill will terminate process with SIGKILL, deleteLater can be used without branching. Anthony Fieroni 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 Aleix Pol Gonzalez
Yuxuan Shui
Anthony Fieroni
Aleix Pol Gonzalez
Yuxuan Shui
Albert Vaca Cintora
Yuxuan Shui
Yuxuan Shui
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit f2925b7661d952c040d76c1bef8a7db2bea7fbac by Albert Vaca on behalf of Yuxuan Shui to branch master.