]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
kill: the situation where fd is opened but not closed
authorfortunate-lee <lijian01@kylinos.cn>
Wed, 19 Nov 2025 01:59:18 +0000 (09:59 +0800)
committerfortunate-lee <lijian01@kylinos.cn>
Wed, 19 Nov 2025 01:59:18 +0000 (09:59 +0800)
Signed-off-by: fortunate-lee <lijian01@kylinos.cn>
misc-utils/kill.c

index df83548f61c75017eb45f528dd9325bbaf9dee74..245c3b6b7a3c3719ff1f543c63ba44be9a05c70a 100644 (file)
@@ -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