From e5cd25e3ffe7afea6669d627aa4e8b96e5973c20 Mon Sep 17 00:00:00 2001 From: Affe Null Date: Fri, 12 Jan 2024 14:56:28 +0100 Subject: [PATCH] Ignore SIGCHLD to avoid leaving zombie processes --- src/cobbler_tftp/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cobbler_tftp/cli.py b/src/cobbler_tftp/cli.py index b1d2869..885b3be 100644 --- a/src/cobbler_tftp/cli.py +++ b/src/cobbler_tftp/cli.py @@ -4,7 +4,7 @@ import os from pathlib import Path -from signal import SIGTERM +from signal import SIGCHLD, SIGTERM from typing import List, Optional import click @@ -87,7 +87,7 @@ def start( ) if application_settings.is_daemon: click.echo("Starting daemon...") - with DaemonContext(): + with DaemonContext(signal_map={SIGCHLD: None}): # All previously open file descriptors are invalid now. # Files and connections needed for the daemon should be opened # in run_server or listed in the files_preserve option