Use a busy loop for signaled process

This commit is contained in:
Kovid Goyal
2022-06-13 19:11:29 +05:30
parent 18cd97d914
commit d228acd30a

View File

@@ -86,7 +86,7 @@ import os, json; from kitty.utils import *; from kitty.fast_data_types import ge
self.assertTrue(found_signal, f'Failed to to get SIGCHLD for signal {signal}')
poll = select.poll()
p = subprocess.Popen([kitty_exe(), '+runpy', 'input()'], stderr=subprocess.DEVNULL, stdin=subprocess.PIPE)
p = subprocess.Popen([kitty_exe(), '+runpy', 'while True: x=2+2'], stderr=subprocess.DEVNULL, stdin=subprocess.PIPE)
signal_read_fd = install_signal_handlers(signal.SIGCHLD)[0]
try:
poll.register(signal_read_fd, select.POLLIN)