Module: xenomai-forge
Branch: rtdm-api-waitqueues
Commit: 9f5c5be61f509ad673a1b5b258ac3b3b9f298e43
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=9f5c5be61f509ad673a1b5b258ac3b3b9f298e43

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Apr 11 10:54:14 2014 +0200

copperplate/registry: fix delay for connection attempts to sysregd

---

 lib/copperplate/registry.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/copperplate/registry.c b/lib/copperplate/registry.c
index 270ed97..ef6aa45 100644
--- a/lib/copperplate/registry.c
+++ b/lib/copperplate/registry.c
@@ -628,11 +628,15 @@ static int spawn_daemon(const char *sessdir)
                ret = -errno;
                break;
        default:
+               /*
+                * Make sure we sleep at least one second regardless
+                * of signal receipts.
+                */
+               while (__STD(sleep(1)) > 0) ;
                regd_pid = pid;
                barrier();
                sa.sa_handler = sigchld_handler;
                sigaction(SIGCHLD, &sa, NULL);
-               usleep(1000000);
                ret = 0;
                break;
        }


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

Reply via email to