mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 14:34:52 +02:00
Consolidate signal handling
Move the signal handler for SIGCHLD into child-monitor.c Makes for cleaner code.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
import locale
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
from contextlib import contextmanager
|
||||
|
||||
@@ -14,8 +13,8 @@ from .cli import create_opts, parse_args
|
||||
from .config import cached_values_for, initial_window_size
|
||||
from .constants import appname, glfw_path, is_macos, is_wayland, logo_data_file
|
||||
from .fast_data_types import (
|
||||
create_os_window, glfw_init, glfw_terminate, install_sigchld_handler,
|
||||
set_default_window_icon, set_options, show_window
|
||||
create_os_window, glfw_init, glfw_terminate, set_default_window_icon,
|
||||
set_options, show_window
|
||||
)
|
||||
from .fonts.box_drawing import set_scale
|
||||
from .utils import (
|
||||
@@ -152,9 +151,7 @@ def _main():
|
||||
try:
|
||||
with setup_profiling(args):
|
||||
# Avoid needing to launch threads to reap zombies
|
||||
install_sigchld_handler()
|
||||
run_app(opts, args)
|
||||
signal.signal(signal.SIGCHLD, signal.SIG_DFL)
|
||||
finally:
|
||||
glfw_terminate()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user