aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2025-11-20 12:20:01 +0100
committerKarel Zak <kzak@redhat.com>2025-11-20 12:20:01 +0100
commit8820d3486ad8c03098e30aa15efa9f915b0c179d (patch)
tree80f3dcb91913e80480ac1f68bfe8af4f54405f9a
parent142eedfb247710db65f127e9738d5ffab7e27cae (diff)
parentc62bb65ad321eebea18f32f5529f8f0a085e57e2 (diff)
downloadutil-linux-8820d3486ad8c03098e30aa15efa9f915b0c179d.tar.gz
Merge branch 'master-branch-4' of https://github.com/Leefancy/util-linux
* 'master-branch-4' of https://github.com/Leefancy/util-linux: kill: the situation where fd is opened but not closed
-rw-r--r--misc-utils/kill.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/misc-utils/kill.c b/misc-utils/kill.c
index df83548f61..245c3b6b7a 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