#672 Koji's child processes ignore SIG_HUP
Opened 2 years ago by mikem. Modified 2 years ago

Originally filed as rhbz#1088233

The daemonize() function in Koji ignores SIGHUP. This function is used by kojid, kojivmd, and kojira (unless they are run with --fg). This is inherited by child processes, which can cause problems for some builds (normally during unit tests). Affected packages include python3 and python-pexpect.


So we either need to stop ignoring sighup, or reset the handler before forking.

As mentioned in the original bug, this snippet argues that ignoring sighup is not necessary:
https://code.activestate.com/recipes/278731-creating-a-daemon-the-/

Side note: when kojid is run through systemd, it is run with --fg and therefore does not ignore sighup.

This should sidestep the issue on Fedora's Koji instance. Can anyone confirm that?

On a side note: A workaround has been applied for python3 upstream.

Login to comment on this ticket.

Metadata