From ae88a1b8c73c188f1fac18f56d44cca8b3c24ba6 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 25 Jan 2024 23:33:27 -0700 Subject: [PATCH] use close_fd and close the writer before the reader --- src/hupper/reloader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hupper/reloader.py b/src/hupper/reloader.py index bb38f13..949d5aa 100644 --- a/src/hupper/reloader.py +++ b/src/hupper/reloader.py @@ -9,7 +9,7 @@ import threading import time -from .ipc import ProcessGroup +from .ipc import ProcessGroup, close_fd from .logger import DefaultLogger, SilentLogger from .utils import ( WIN, @@ -195,8 +195,8 @@ def _start_control(self): try: yield finally: - os.close(self.control_r) - os.close(self.control_w) + close_fd(self.control_w) + close_fd(self.control_r) self.control_r = self.control_w = None def _control_proxy(self, signal):