Re: [PATCH 0/1] Fix a long-standing isatty() problem on Windows
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 11, 2016, 17:49 UTC
- Message-ID
- <xmqqmvg2nyo6.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <cover.1481454992.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 5 quoted lines
> I finally got a chance to debug the problems with the ever-timing-out > test runs of `pu` on Windows. Turns out that pb/bisect uncovered a > really old, really bad bug: on Windows, isatty() does not do what Git > expects, at least not completely: it detects interactive terminals *and > character devices*.
Sounds as if somebody who did Windows at Microsoft had a good sense of humor to mimick the misnamed ENOTTY gotcha ;-)
This is a great find, and a very impactful fix, as redirecting from /dev/null is how we try to force a "go interactive if talking to tty" program to realize that it is not talking to a tty.
Thanks.