From nobody Mon Oct 18 22:03:59 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B6A0E180820B; Mon, 18 Oct 2021 22:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HY9rH4l2Hz4dR4; Mon, 18 Oct 2021 22:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83DFA1D3; Mon, 18 Oct 2021 22:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19IM3xBw009085; Mon, 18 Oct 2021 22:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19IM3xO8009084; Mon, 18 Oct 2021 22:03:59 GMT (envelope-from git) Date: Mon, 18 Oct 2021 22:03:59 GMT Message-Id: <202110182203.19IM3xO8009084@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Adriaan de Groot Subject: git: 2ca25d708908 - main - x11/konsole: avoid weird message when exiting last shell List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adridg X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ca25d7089085af7f8a9201beba4d10ff4cdf1da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by adridg: URL: https://cgit.FreeBSD.org/ports/commit/?id=2ca25d7089085af7f8a9201beba4d10ff4cdf1da commit 2ca25d7089085af7f8a9201beba4d10ff4cdf1da Author: Adriaan de Groot AuthorDate: 2021-10-18 21:52:49 +0000 Commit: Adriaan de Groot CommitDate: 2021-10-18 21:52:49 +0000 x11/konsole: avoid weird message when exiting last shell Konsole complains about "kernel" still running in the terminal when exiting the last shell in the last tab; this only shows up if PID 0 is visible (depends on hardening options). Avoid that (on Linux, apparently the invalid PID equals the invalid foreground group ID). PR: 258996 Reported by: alt2600@icloud.com --- x11/konsole/Makefile | 1 + x11/konsole/files/patch-src_MainWindow.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/x11/konsole/Makefile b/x11/konsole/Makefile index 5c4bc371e777..ade7a068cd68 100644 --- a/x11/konsole/Makefile +++ b/x11/konsole/Makefile @@ -1,5 +1,6 @@ PORTNAME= konsole DISTVERSION= ${KDE_APPLICATIONS_VERSION} +PORTREVISION= 1 CATEGORIES= x11 kde kde-applications # kde kde-applications-applications MAINTAINER= kde@FreeBSD.org diff --git a/x11/konsole/files/patch-src_MainWindow.cpp b/x11/konsole/files/patch-src_MainWindow.cpp new file mode 100644 index 000000000000..57f3f4d6d33a --- /dev/null +++ b/x11/konsole/files/patch-src_MainWindow.cpp @@ -0,0 +1,25 @@ +From 00d565eedea5be0b5c9ad66b29bdf14c63a5e035 Mon Sep 17 00:00:00 2001 +From: Adriaan de Groot +Date: Mon, 18 Oct 2021 11:07:30 +0200 +Subject: [PATCH 2/2] Special-case PID 0 on FreeBSD + +PID 0 is the kernel; when the shell exits, the process ID for +the session becomes 0. Downstream bug report + https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258996 +--- src/MainWindow.cpp.orig 2021-10-04 22:10:38 UTC ++++ src/MainWindow.cpp +@@ -609,6 +609,14 @@ bool MainWindow::queryClose() + continue; + } + ++ // On FreeBSD, after exiting the shell, the foreground GID is ++ // an invalid value, and the shell PID is 0. Those are not equal, ++ // so isForegroundProcessActive() returns true -- leading to a ++ // complaint about "kernel" here. Special-case PID 0 to avoid that. ++ if (session->processId() == 0) { ++ continue; ++ } ++ + const QString defaultProc = session->program().split(QLatin1Char('/')).last(); + const QString currentProc = session->foregroundProcessName().split(QLatin1Char('/')).last(); +