Add the "Send Signals" menus from KDE 3.5

This reintroduces the "Send Signals" from KDE 3.5.
SIGSTOP/CONT/HUP/INT/TERM/KILL/USR1/USR2

Patch by Kasper Laudrup  laudrup@stacktrace.dk

FIXED-IN: 4.10
FEATURE: 214908
This commit is contained in:
Kurt Hindenburg
2012-08-04 18:05:09 -04:00
parent 52a1d835a3
commit a4b08ea190
5 changed files with 70 additions and 1 deletions

View File

@@ -725,6 +725,18 @@ void Session::refresh()
_shellProcess->setWindowSize(existingSize.width(), existingSize.height());
}
void Session::sendSignal(int signal)
{
const ProcessInfo* process = getProcessInfo();
bool ok = false;
int pid;
pid = process->foregroundPid(&ok);
if (ok) {
::kill(pid, signal);
}
}
bool Session::kill(int signal)
{
if (_shellProcess->pid() <= 0)