Module: xenomai-3
Branch: next
Commit: cf34dd29724a36f21218f91b2e95d506ff69e8d0
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=cf34dd29724a36f21218f91b2e95d506ff69e8d0

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Wed Jan  7 18:04:27 2015 +0100

sysregd: Register atexit hook earlier

Already copperplate_bootstrap_minimal can fail and terminate. Therefore
register the cleanup hook earlier.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 lib/copperplate/regd/regd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c
index e98e3bd..e519661 100644
--- a/lib/copperplate/regd/regd.c
+++ b/lib/copperplate/regd/regd.c
@@ -359,12 +359,13 @@ static void create_system_fs(const char *arg0, const char 
*rootdir)
        if (ret)
                error(1, -ret, "create_directory_recursive(\"%s\")", mountpt);
 
+       atexit(delete_system_fs);
+
        CPU_ZERO(&__node_info.cpu_affinity);
        __node_info.session_label = session;
        __node_info.registry_root = rootdir;
        sysroot = mountpt;
        copperplate_bootstrap_minimal(arg0, mountpt);
-       atexit(delete_system_fs);
 
        note("mounted system fs at %s", mountpt);
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to