Set parent and foreground process ids on macOS

This allows sending signals to work again.  Correct macos keytab so
Ctrl+C and Ctrl+V work.  Add warning to show sending signals
require foreground process id to be set.
wilder
Kurt Hindenburg 5 years ago
parent 0f8d4e0ca7
commit e324355c06
  1. 4
      data/keyboard-layouts/macos.keytab
  2. 4
      src/ProcessInfo.cpp
  3. 2
      src/session/Session.cpp

@ -12,12 +12,12 @@ keyboard "macOS"
# ~/Library/Application Support/konsole/
key A+Ctrl : "\x01" # goto start of line
#key C+Ctrl : "\x03" # Does not work - Cmd+C is copy
key C+Ctrl : "\x03" # interrupt
key D+Ctrl : "\x04" # logout "exit"
key E+Ctrl : "\x05" # goto end of line
key L+Ctrl : "\x0C" # clear terminal screen
key U+Ctrl : "\x15" # clear current line
#key V+Ctrl : "\x16" # Cmd+V is paste
key V+Ctrl : "\x16" #
key W+Ctrl : "\x17" # erase the word preceding to the cursor position
#key Z+Ctrl : "\x1a"

@ -793,6 +793,10 @@ private:
const QString deviceNumber = QString::fromUtf8(devname(((&kInfoProc->kp_eproc)->e_tdev), S_IFCHR));
const QString fullDeviceName = QStringLiteral("/dev/")
+ deviceNumber.rightJustified(3, QLatin1Char('0'));
setParentPid(kInfoProc->kp_eproc.e_ppid);
setForegroundPid(kInfoProc->kp_eproc.e_pgid);
delete [] kInfoProc;
const QByteArray deviceName = fullDeviceName.toLatin1();

@ -790,6 +790,8 @@ void Session::sendSignal(int signal)
if (ok) {
::kill(pid, signal);
} else {
qWarning()<<"foreground process id not set, unable to send signal "<<signal;
}
}

Loading…
Cancel
Save