Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yocalebo committed Dec 12, 2024
1 parent 596a97a commit 2f7cea2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/test_terminate_pid.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
from os import kill
from signal import signal, SIGCHLD, SIG_IGN
from subprocess import Popen
from textwrap import dedent
from time import sleep

from middlewared.utils.os import terminate_pid

# ignore SIGCHLD so child process is removed
# from process table immediately without parent
# process having to do any (formal) clean-up
signal(SIGCHLD, SIG_IGN)


def test_sigterm():
p = Popen(['python', '-c', 'import time; time.sleep(60)'])
Expand Down

0 comments on commit 2f7cea2

Please sign in to comment.