Opened 18 years ago

Last modified 18 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
Cc:

Description

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 18 years ago by froloff

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

comment:2 Changed 18 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.