[systemd-devel] [PATCH] switch-root: do not use close_nointr_nofail()

harald at redhat.com harald at redhat.com
Tue May 22 06:19:50 PDT 2012


From: Harald Hoyer <harald at redhat.com>

rm_rf_children() might have already closed the fd with closedir().
We just don't know.
---
 src/core/switch-root.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/switch-root.c b/src/core/switch-root.c
index ed0a31e..1802dc1 100644
--- a/src/core/switch-root.c
+++ b/src/core/switch-root.c
@@ -119,7 +119,7 @@ int switch_root(const char *new_root) {
 
 fail:
         if (old_root_fd >= 0)
-                close_nointr_nofail(old_root_fd);
+                close_nointr(old_root_fd);
 
         return r;
 }
-- 
1.7.10.2



More information about the systemd-devel mailing list