- pkttyagent: backport patch, get SIGTTOU in background job
- pkttyagent: unread input flushed on terminal restore
This commit is contained in:
parent
b9ac0be49e
commit
1c896db341
12
pkttyagent-tcsaflush-batch-erase.patch
Normal file
12
pkttyagent-tcsaflush-batch-erase.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up ./src/programs/pkttyagent.c.ori ./src/programs/pkttyagent.c
|
||||||
|
--- ./src/programs/pkttyagent.c.ori 2019-09-27 16:52:24.377434038 +0200
|
||||||
|
+++ ./src/programs/pkttyagent.c 2019-09-27 16:53:01.743875350 +0200
|
||||||
|
@@ -56,7 +56,7 @@ static void tty_handler(int signal)
|
||||||
|
|
||||||
|
if (tty_flags_saved)
|
||||||
|
{
|
||||||
|
- tcsetattr (fileno (tty), TCSAFLUSH, &ts);
|
||||||
|
+ tcsetattr (fileno (tty), TCSADRAIN, &ts);
|
||||||
|
}
|
||||||
|
|
||||||
|
kill(getpid(), signal);
|
30
polkit-0.116-pkttyagent-sigttou-bg-job.patch
Normal file
30
polkit-0.116-pkttyagent-sigttou-bg-job.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 76aae4fce586b400f5fe08df31497db19d624609 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Rybar <jrybar@redhat.com>
|
||||||
|
Date: Thu, 1 Aug 2019 06:46:10 +0000
|
||||||
|
Subject: [PATCH] pkttyagent: process stopped by SIGTTOU if run in background
|
||||||
|
job
|
||||||
|
|
||||||
|
---
|
||||||
|
src/programs/pkttyagent.c | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/programs/pkttyagent.c b/src/programs/pkttyagent.c
|
||||||
|
index 3c8d502..13879a2 100644
|
||||||
|
--- a/src/programs/pkttyagent.c
|
||||||
|
+++ b/src/programs/pkttyagent.c
|
||||||
|
@@ -264,6 +264,12 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
|
memset (&sa, 0, sizeof (sa));
|
||||||
|
sa.sa_handler = &tty_handler;
|
||||||
|
+/* If tty_handler() resets terminal while pkttyagent is run in background job,
|
||||||
|
+ the process gets stopped by SIGTTOU. This impacts systemctl, hence it must
|
||||||
|
+ be blocked for a while and then the process gets killed anyway.
|
||||||
|
+ */
|
||||||
|
+ sigemptyset(&sa.sa_mask);
|
||||||
|
+ sigaddset(&sa.sa_mask, SIGTTOU);
|
||||||
|
sigaction (SIGTERM, &sa, &savesigterm);
|
||||||
|
sigaction (SIGINT, &sa, &savesigint);
|
||||||
|
sigaction (SIGTSTP, &sa, &savesigtstp);
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
@ -6,12 +6,15 @@
|
|||||||
Summary: An authorization framework
|
Summary: An authorization framework
|
||||||
Name: polkit
|
Name: polkit
|
||||||
Version: 0.116
|
Version: 0.116
|
||||||
Release: 2%{?dist}
|
Release: 2%{?dist}.1
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.freedesktop.org/wiki/Software/polkit
|
URL: http://www.freedesktop.org/wiki/Software/polkit
|
||||||
Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz
|
Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz
|
||||||
Source1: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz.sign
|
Source1: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz.sign
|
||||||
|
|
||||||
|
Patch1: polkit-0.116-pkttyagent-sigttou-bg-job.patch
|
||||||
|
Patch2: pkttyagent-tcsaflush-batch-erase.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: glib2-devel >= 2.30.0
|
BuildRequires: glib2-devel >= 2.30.0
|
||||||
BuildRequires: expat-devel
|
BuildRequires: expat-devel
|
||||||
@ -174,6 +177,10 @@ exit 0
|
|||||||
%{_libdir}/girepository-1.0/*.typelib
|
%{_libdir}/girepository-1.0/*.typelib
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 02 2019 Jan Rybar <jrybar@redhat.com> - 0.116-2.1
|
||||||
|
- pkttyagent: backport patch, get SIGTTOU in background job
|
||||||
|
- pkttyagent: unread input flushed on terminal restore
|
||||||
|
|
||||||
* Sun Sep 08 2019 Kalev Lember <klember@redhat.com> - 0.116-2
|
* Sun Sep 08 2019 Kalev Lember <klember@redhat.com> - 0.116-2
|
||||||
- Rebuilt for mozjs60 s390x fixes
|
- Rebuilt for mozjs60 s390x fixes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user