From 0d6da942824089b128b72e1f1049ca2811d4af06 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Mon, 12 Aug 2024 13:08:59 +0200 Subject: [PATCH] libraries.stdlib.call: fix leaking epoll FD --- leapp/libraries/stdlib/call.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leapp/libraries/stdlib/call.py b/leapp/libraries/stdlib/call.py index 5d9ceedfe..89133d9e5 100644 --- a/leapp/libraries/stdlib/call.py +++ b/leapp/libraries/stdlib/call.py @@ -171,9 +171,9 @@ def _call(command, callback_raw=lambda fd, value: None, callback_linebuffered=la elif stdin is not None: raise TypeError('stdin has to be either a file descriptor or string, not "{!s}"'.format(type(stdin))) - ep = EventLoop() pid = os.fork() if pid > 0: + ep = EventLoop() # Since pid > 0, we are in the parent process, so we have to close the write-end # file descriptors os.close(wstdout)