From 7f7cfcf339e27ed29b8f93abdbab4784621dd424 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 22 Mar 2021 16:57:55 +0100 Subject: [PATCH] Only donate term if we're interactive *and* have the terminal As it turns out otherwise fish would hang when sddm starts it as the login shell. Belongs to #7842. --- src/reader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reader.cpp b/src/reader.cpp index ea4c96114..74ffb7a74 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -1342,7 +1342,8 @@ void reader_init() { // Set up our fixed terminal modes once, // so we don't get flow control just because we inherited it. - if (is_interactive_session()) { + if (is_interactive_session() && + getpgrp() == tcgetpgrp(STDIN_FILENO)) { term_donate(/* quiet */ true); }