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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Feb 19 21:35:02 2015 +0100

autotune: fix build with _FORTIFY_SOURCE > 0

---

 utils/autotune/autotune.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/utils/autotune/autotune.c b/utils/autotune/autotune.c
index 462f6b8..3ea6672 100644
--- a/utils/autotune/autotune.c
+++ b/utils/autotune/autotune.c
@@ -296,8 +296,11 @@ int main(int argc, char *const argv[])
                }
        }
 
-       if (background)
-               daemon(0, 0);
+       if (background) {
+               ret = daemon(0, 0);
+               if (ret)
+                       error(1, errno, "cannot daemonize");
+       }
 
        fd = open("/dev/rtdm/autotune", O_RDONLY);
        if (fd < 0)


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

Reply via email to