Skip to content

Commit c6f679e

Browse files
authored
restarter: Fix incorrect use of global (envoyproxy#40004)
Signed-off-by: Ryan Northey <[email protected]>
1 parent 843b6a2 commit c6f679e

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

restarter/hot-restarter.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def term_all_children():
3232
# First uninstall the SIGCHLD handler so that we don't get called again.
3333
signal.signal(signal.SIGCHLD, signal.SIG_DFL)
3434

35-
global pid_list
3635
for pid in pid_list:
3736
logger.info("sending TERM to PID={}".format(pid))
3837
try:
@@ -114,7 +113,6 @@ def sighup_handler(signum, frame):
114113
def sigusr1_handler(signum, frame):
115114
""" Handler for SIGUSR1. Propagate SIGUSR1 to all of the child processes """
116115

117-
global pid_list
118116
for pid in pid_list:
119117
logger.info("sending SIGUSR1 to PID={}".format(pid))
120118
try:
@@ -132,7 +130,6 @@ def sigchld_handler(signum, frame):
132130
logger.info("got SIGCHLD")
133131

134132
kill_all_and_exit = False
135-
global pid_list
136133
pid_list_copy = list(pid_list)
137134
for pid in pid_list_copy:
138135
ret_pid, exit_status = os.waitpid(pid, os.WNOHANG)

0 commit comments

Comments
 (0)