From c62bb65ad321eebea18f32f5529f8f0a085e57e2 Mon Sep 17 00:00:00 2001 From: fortunate-lee Date: Wed, 19 Nov 2025 09:59:18 +0800 Subject: [PATCH] kill: the situation where fd is opened but not closed Signed-off-by: fortunate-lee --- misc-utils/kill.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc-utils/kill.c b/misc-utils/kill.c index df83548f6..245c3b6b7 100644 --- a/misc-utils/kill.c +++ b/misc-utils/kill.c @@ -557,6 +557,9 @@ static int kill_with_timeout(const struct kill_control *ctl) err(EXIT_FAILURE, _("pidfd_send_signal() failed")); } } + + close(pfd); + return 0; } #endif -- 2.47.3