diff options
authorMartin T. H. Sandsmark <>2016-08-28 17:29:08 (GMT)
committerMartin T. H. Sandsmark <>2016-08-28 22:12:40 (GMT)
commitce4ab922496cb9e133f96db78c5b67bc01429512 (patch)
parente21fc13c473cff47654f02b1e5ecd6ff8e3636f4 (diff)
Only send EOF to known shells
The only processes that are "safe" or require us to send an EOF to terminate cleanly are shells, so verify that people didn't run with -e tmux or similar. REVIEW: 128791 BUG: 367746
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Session.cpp b/src/Session.cpp
index 9178eb2..0a229de 100644
--- a/src/Session.cpp
+++ b/src/Session.cpp
@@ -822,8 +822,10 @@ bool Session::closeInNormalWay()
return true;
- // Check if the default shell is running, in that case try sending an EOF for a clean exit
- if (!isForegroundProcessActive()) {
+ static QSet<QString> knownShells({"ash", "bash", "csh", "dash", "fish", "hush", "ksh", "mksh", "pdksh", "tcsh", "zsh"});
+ // If only the session's shell is running, try sending an EOF for a clean exit
+ if (!isForegroundProcessActive() && knownShells.contains(QFileInfo(_program).fileName())) {
if (_shellProcess->waitForFinished(1000)) {