代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d8060d01a01e3d5b187ae4388f10b0d0c2c0c4f3 Mon Sep 17 00:00:00 2001
From: iasunsea <[email protected]>
Date: Tue, 6 Dec 2022 18:24:50 +0800
Subject: [PATCH] Ignore SIGINT in D-Bus launcher and x11 too
When we do install, especially use TUI to install, we some time have take
a mistake to put "CTRL+C", then there will be stop with traceback. And we
know the main process have shielded SIGINT, so we to shield subprocesses also.
Conflict:NA
Reference:https://github.com/rhinstaller/anaconda/commit/d8060d01a01e3d5b187ae4388f10b0d0c2c0c4f3
---
pyanaconda/core/startup/dbus_launcher.py | 6 ++++++
pyanaconda/display.py | 8 +++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/core/startup/dbus_launcher.py b/pyanaconda/core/startup/dbus_launcher.py
index 2881c28..a866df0 100644
--- a/pyanaconda/core/startup/dbus_launcher.py
+++ b/pyanaconda/core/startup/dbus_launcher.py
@@ -24,6 +24,7 @@
# Author(s): Jiri Konecny <[email protected]>
#
import os
+import signal
from subprocess import TimeoutExpired
from pyanaconda.core.configuration.anaconda import conf
@@ -109,6 +110,10 @@ class AnacondaDBusLauncher(object):
"--syslog",
"--config-file={}".format(ANACONDA_BUS_CONF_FILE)
]
+
+ def dbus_preexec():
+ # to set dbus subprocess SIGINT handler
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
self._log_file = open('/tmp/dbus.log', 'a')
self._dbus_daemon_process = startProgram(
@@ -117,6 +122,7 @@ class AnacondaDBusLauncher(object):
env_add={"LANG": DEFAULT_LANG},
env_prune=["LANGUAGE", "LC_ALL", "LC_MESSAGES"],
reset_lang=False,
+ preexec_fn=dbus_preexec
)
if self._dbus_daemon_process.poll() is not None:
diff --git a/pyanaconda/display.py b/pyanaconda/display.py
index ddf24fb..ed163e7 100644
--- a/pyanaconda/display.py
+++ b/pyanaconda/display.py
@@ -24,6 +24,7 @@ import subprocess
import time
import textwrap
import pkgutil
+import signal
from pyanaconda.core.configuration.anaconda import conf
from pyanaconda.core.process_watchers import WatchProcesses
@@ -192,8 +193,13 @@ def do_startup_x11_actions():
else:
xdg_data_dirs = datadir + '/window-manager:/usr/share'
+ def x11_preexec():
+ # to set GUI subprocess SIGINT handler
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
+
childproc = util.startProgram(["metacity", "--display", ":1", "--sm-disable"],
- env_add={'XDG_DATA_DIRS': xdg_data_dirs})
+ env_add={'XDG_DATA_DIRS': xdg_data_dirs},
+ preexec_fn=x11_preexec)
WatchProcesses.watch_process(childproc, "metacity")
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。