From 2006ab1dd8b63ec09b19d062ac6d02edaaccafa2 Mon Sep 17 00:00:00 2001
From: Tomas Kopecek <tkopecek@redhat.com>
Date: Aug 01 2022 09:34:41 +0000
Subject: [PATCH 1/2] don't propagate SIGHUP ignore to child processes


Related: https://pagure.io/koji/issue/672

---

diff --git a/koji/__init__.py b/koji/__init__.py
index 58ca831..309c6c0 100644
--- a/koji/__init__.py
+++ b/koji/__init__.py
@@ -584,8 +584,9 @@ def daemonize():
     if pid:
         os._exit(0)
     os.setsid()
-    signal.signal(signal.SIGHUP, signal.SIG_IGN)
-    # fork again
+    # fork again, no need to ignore SIGHUP
+    # https://pagure.io/koji/issue/672
+    # https://code.activestate.com/recipes/278731-creating-a-daemon-the-/
     pid = os.fork()
     if pid:
         os._exit(0)

From b3f7d7c34e1ebd5f35fd0d90a78d0f47c741e7b9 Mon Sep 17 00:00:00 2001
From: Tomas Kopecek <tkopecek@redhat.com>
Date: Aug 01 2022 09:34:41 +0000
Subject: [PATCH 2/2] remove unused import


---

diff --git a/koji/__init__.py b/koji/__init__.py
index 309c6c0..1fb90b2 100644
--- a/koji/__init__.py
+++ b/koji/__init__.py
@@ -37,7 +37,6 @@ import os.path
 import pwd
 import random
 import re
-import signal
 import socket
 import struct
 import sys

