Module: xenomai-forge Branch: master Commit: 693efe061193fafca18d880a2984d7205b0f6137 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=693efe061193fafca18d880a2984d7205b0f6137
Author: Philippe Gerum <r...@xenomai.org> Date: Mon Dec 12 15:44:11 2011 +0100 lib/cobalt: fix printf buffer cleanup at fork (bad merge) --- lib/cobalt/printf.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/cobalt/printf.c b/lib/cobalt/printf.c index 70e2713..aeddd22 100644 --- a/lib/cobalt/printf.c +++ b/lib/cobalt/printf.c @@ -632,6 +632,10 @@ static void forked_child_init(void) while (*pbuffer) { if (*pbuffer == my_buffer) pbuffer = &(*pbuffer)->next; + else if ((unsigned long)*pbuffer - pool_start < pool_len) { + cleanup_buffer(*pbuffer); + pbuffer = &(*pbuffer)->next; + } else cleanup_buffer(*pbuffer); } _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git