Skip to content

Commit

Permalink
pythongh-126434: Remove print statements used/useful for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarref committed Nov 12, 2024
1 parent cbecc76 commit 2f90fb2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Lib/test/multiprocessingdata/event_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,21 @@


def send_sigint(pid):
print('send_sigint running')
os.kill(pid, signal.SIGINT)


def run_signal_handler_test():
shutdown_event = multiprocessing.Event()

def sigterm_handler(_signo, _stack_frame):
try:
print('sigterm_handler running')
shutdown_event.set()
finally:
print('sigterm_handler done')
shutdown_event.set()

signal.signal(signal.SIGINT, sigterm_handler)

with concurrent.futures.ProcessPoolExecutor() as executor:
f = executor.submit(send_sigint, os.getpid())
while not shutdown_event.is_set():
pass
print('Received shutdown event')
f.result()


Expand Down

0 comments on commit 2f90fb2

Please sign in to comment.