projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a479f0
)
async: block SIGTERM in asynchronous_rm_rf()
author
Mike Yuan
<me@yhndnzj.com>
Mon, 11 Nov 2024 18:11:38 +0000
(19:11 +0100)
committer
Luca Boccassi
<luca.boccassi@gmail.com>
Thu, 14 Nov 2024 12:21:25 +0000
(12:21 +0000)
See justifications at https://github.com/systemd/systemd/pull/32235#issuecomment-
2062327783
src/shared/async.c
patch
|
blob
|
history
diff --git
a/src/shared/async.c
b/src/shared/async.c
index bd043c8484a50888ba5a3ea343c7c7d4d908aad8..e0c7e7dcaab44b9206ed205345d2410b46dedfa4 100644
(file)
--- a/
src/shared/async.c
+++ b/
src/shared/async.c
@@
-147,6
+147,10
@@
int asynchronous_rm_rf(const char *p, RemoveFlags flags) {
/* Child */
+ /* Let's block SIGTERM here, to grant the operation more time on e.g. final killing spree
+ * during shutdown. If this gets stalled pid1 would eventually send SIGKILL to us. */
+ BLOCK_SIGNALS(SIGTERM);
+
r = rm_rf(p, flags);
if (r < 0) {
log_debug_errno(r, "Failed to rm -rf '%s', ignoring: %m", p);