Module: xenomai-head
Branch: master
Commit: e30ff8dca10598cf720d68ee08afaf76bdbc5308
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=e30ff8dca10598cf720d68ee08afaf76bdbc5308

Author: Gilles Chanteperdrix <[email protected]>
Date:   Wed Aug 17 23:45:20 2011 +0200

common: fix fork handler

Do not try to unlink the buffers from the static pool, as they should
always remain in the buffers list.

---

 src/skins/common/rt_print.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/skins/common/rt_print.c b/src/skins/common/rt_print.c
index e398135..730cf70 100644
--- a/src/skins/common/rt_print.c
+++ b/src/skins/common/rt_print.c
@@ -610,7 +610,8 @@ static void forked_child_init(void)
        pthread_mutex_init(&buffer_lock, NULL);
 
        while (*pbuffer) {
-               if (*pbuffer == my_buffer)
+               if (*pbuffer == my_buffer ||
+                   (unsigned long)*pbuffer - pool_start < pool_len)
                        pbuffer = &(*pbuffer)->next;
                else
                        cleanup_buffer(*pbuffer);


_______________________________________________
Xenomai-git mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-git

Reply via email to