chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
core: make systemd.confirm_spawn=1 actually work
[elogind.git]
/
src
/
core
/
switch-root.c
diff --git
a/src/core/switch-root.c
b/src/core/switch-root.c
index ed0a31e6978b3649429f57f83710ed7dc621d52e..9832a520e4ac3f29d6ecfce0e85d181d826fcb3a 100644
(file)
--- a/
src/core/switch-root.c
+++ b/
src/core/switch-root.c
@@
-111,8
+111,10
@@
int switch_root(const char *new_root) {
if (fstat(old_root_fd, &rb) < 0)
log_warning("Failed to stat old root directory, leaving: %m");
- else
+ else
{
rm_rf_children(old_root_fd, false, false, &rb);
+ old_root_fd = -1;
+ }
}
r = 0;