git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 26, 2016, 13:28 UTC
Message-ID
<alpine.DEB.2.20.1605261525400.4449@virtualbox>
In-Reply-To
<f1408371e14ff10539990ad710681ef17f29fea1.1461770158.git.johannes.schindelin@gmx.de>
Hi Junio,
On Wed, 27 Apr 2016, Johannes Schindelin wrote:
Show 17 quoted lines
> From: Karsten Blees <blees@dcon.de>
> 
> MSYS2 emulates pseudo terminals via named pipes, and isatty() returns 0
> for such file descriptors. Therefore, some interactive functionality
> (such as launching a pager, asking if a failed unlink should be repeated
> etc.) doesn't work when run in a terminal emulator that uses MSYS2's
> ptys (such as mintty).
> 
> However, MSYS2 uses special names for its pty pipes ('msys-*-pty*'),
> which allows us to distinguish them from normal piped input / output.
> 
> On startup, check if stdin / stdout / stderr are connected to such pipes
> using the NtQueryObject API from NTDll.dll. If the names match, adjust
> the flags in MSVCRT's ioinfo structure accordingly.
> 
> Signed-off-by: Karsten Blees <blees@dcon.de>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

For the record, this patch is needed to make the output of `git log` *not* whizz by when running in MinTTY, the default terminal of Git for Windows and MSYS2.

I do not see this patch in 'pu'... Anything I can do to get this into 'master' eventually?

Ciao, Dscho

Previous: Johannes SchindelinNext: Junio C Hamano
Message 2 of 4 in “mingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*)”
  1. mingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*)Johannes Schindelin, Apr 27, 2016
  2. Johannes SchindelinMay 26, 2016
  3. Junio C HamanoMay 26, 2016
  4. Johannes SchindelinMay 27, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.