stdout and stderr are getting mixed up?

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jul 3 06:08:11 UTC 2017


On 30/06/17 15:01, Sebastian Huber wrote:

> Hello,
>
> would you mind testing with the latest tool chain (RSB) and the latest 
> RTEMS master:
>
> https://git.rtems.org/rtems/commit/?id=9b07f5efe364bc52b80eff83389ee4bf4a1e0c40 
>
>
> https://git.rtems.org/rtems-source-builder/commit/?id=5ede1c7e8b1874bbac2f8a3d158bd1c7d802156d 
>
>
> I changed Newlib to use global stdio stream FILE objects. With this 
> change a freopen(..., stdin) etc. will close the global stdin FILE 
> object. In order to create thread-local stdio stream objects, you have 
> to use stdin = fopen(...), etc.
>

Ok, I should have read the subject more closely. I think its perfectly 
fine that stdout and stderr streams are mixed up. I did run the attached 
program on Linux and I get:

gcc -O2 test.c -pthread && ./a.out 2>&1 | grep ab
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
...

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 459 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20170703/94b2a09e/attachment.bin>


More information about the users mailing list