[Konsole-devel] [Bug 286367] zsh crash in dolphin (konsole part) leads to all processes in X getting killed

Jekyll Wu adaptee at gmail.com
Tue Jan 24 16:50:30 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=286367


Jekyll Wu <adaptee at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.penz19 at gmail.com




--- Comment #9 from Jekyll Wu <adaptee gmail com>  2012-01-24 16:50:30 ---
Well, I get some clue for the disastrous damage. It is in the code of terminal
panel of dolphin.

void TerminalPanel::sendCdToTerminal(const QString& dir)
{
    if (!m_clearTerminal) {
        // The TerminalV2 interface does not provide a way to delete the
        // current line before sending a new input. This is mandatory,
        // otherwise sending a 'cd x' to a existing 'rm -rf *' might
        // result in data loss. As workaround SIGINT is send.
        kill(m_terminal->terminalProcessId(), SIGINT);
    }
    ...
}

When zsh crashes, 'm_terminal->terminalProcessId()' returns 0 since that is
what QProcess::pid() returns in that situation. So that line becomes 'kill(0,
SIGINT)' and it causes big problem.

@Peter:

I think this is firstly a problem of konsolepart. But I currently have no clear
idea about what konsole and konsolepart should do and return in this case.
Could you add some safeguard for pid being 0 ?

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list