|
From: | Paul Eggert |
Subject: | Re: [PATCH] binary-io: do not treat set_binary_mode() on stdin/out/err as an error on OS/2 |
Date: | Wed, 29 May 2019 17:05:52 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 5/28/19 5:47 PM, Bruno Haible wrote:
OK, so tee.c, tr.c etc. ought to contain the equivalent of: if (! isatty (STDIN_FILENO)) setmode (STDIN_FILENO, O_BINARY); if (! isatty (STDOUT_FILENO)) setmode (STDOUT_FILENO, O_BINARY);
That sounds overly complicated. Can't we arrange to have something simpler, like what we have now?
xset_binary_mode (STDIN_FILENO, O_BINARY); xset_binary_mode (STDOUT_FILENO, O_BINARY);The idea is that tee.c, tr.c, etc. should not have to worry about calling isatty.
[Prev in Thread] | Current Thread | [Next in Thread] |