From a855bcf9dc61920a112dd4fbd37489b5c418faab Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 28 Nov 2024 22:37:20 +0530 Subject: [PATCH] ... --- benchmark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark.py b/benchmark.py index 324c7362f..26116b83e 100755 --- a/benchmark.py +++ b/benchmark.py @@ -13,7 +13,7 @@ import time from pty import CHILD, fork from kitty.constants import kitten_exe -from kitty.fast_data_types import Screen +from kitty.fast_data_types import Screen, safe_pipe from kitty.utils import read_screen_size @@ -39,7 +39,7 @@ def run_parsing_benchmark(cell_width: int = 10, cell_height: int = 20, scrollbac fcntl.ioctl(master_fd, termios.TIOCSWINSZ, s) write_buf = b'' - r_pipe, w_pipe = os.pipe2(os.O_CLOEXEC | os.O_NONBLOCK) + r_pipe, w_pipe = safe_pipe(True) class ToChild: def write(self, x: bytes | str) -> None: nonlocal write_buf