Opened 15 years ago

Last modified 14 years ago

#18 new defect

libc: -Zbin-files doesn't work on stdin/out/err - init order

Reported by: bird Owned by: bird
Priority: normal Milestone: libc-0.7
Component: libc Version: 0.6
Severity: normal Keywords: libc stdio


There is a init order problem with -Zbin-files when LIBC is linked dynamically. stdio.c is called long before any constructors in the executable is invoked, so the bin-files flag flipping won't apply to any handles opened or initialized there.

Change History (2)

comment:1 Changed 14 years ago by froloff

May be it will be usefull to test if stdin/stdout isatty(), before changing mode?

comment:2 Changed 14 years ago by bird

It appears this borken all together. The best workaround is to use O_BINARY and O_TEXT when those applies instead of -Zbin-files.

Note: See TracTickets for help on using tickets.