Opened 10 years ago

Last modified 8 years ago

#335 new defect

Inheritance of a translation mode of stdin/stdout/stderr

Reported by: KO Myung-Hun Owned by:
Priority: normal Milestone: libc-0.7
Component: libc Version: 0.6.6
Severity: normal Keywords:
Cc:

Description

Hi/2.

A child process by spawn() and exec() inherits a translation mode(O_TEXT/O_BINARY) of stdin/stdout/stderr of a parent process.

Whereas EMX and MinGW do not so. I think, EMX and MinGW are right.

However, a child process by fork() should inherit it like current.

Any idea ?

Change History (1)

comment:1 by KO Myung-Hun, 8 years ago

I think, current behavior of kLIBC is useful for non-console handles. However, if stdio/stdout/stderr of a child process is a console, then a translation mode of a parent process should be ignored. That is, those handles should be opened in text mode unconditionally in a child process.

Note: See TracTickets for help on using tickets.