On Thu, Jun 16, 2022 at 1:38 AM Dmitry Yemanov <firebi...@yandex.ru> wrote:
> > See: > > > https://github.com/FirebirdSQL/firebird/commit/c8c7c3a44dad9572a55d6fed68f1c399a19366db > > Initially (FB2) the code was: > > if (GetFileType(in) == FILE_TYPE_DISK) > Interactive = false; > > then (circa 2.5) it was changed to: > > if (GetFileType(in) == FILE_TYPE_CHAR) > Interactive = true; > > and later fixed to: > > if (file_type == FILE_TYPE_CHAR || file_type == FILE_TYPE_PIPE) > Interactive = true; > > > Are there any reason for that? > > We have an old customer who uses (and distributes among clients, IIRC) > their own GUI frontend for ISQL that tunnels console I/O using pipes and > it should work as "interactive" mode. > > The commit mentions no ticket nor also mentions that it causes a problem in standard usage with real pipe in Windows. This question has interesting links: https://stackoverflow.com/questions/40912072/git-for-windows-mintty-sys-stdout-isatty-returns-false I've tested the winpty approach in msys and it works correctly when ISQL does not consider pipe as tty. It also fixes the arrow keys problem. winpty is a library too and would be the easiest solution for that customer. There is also the Windows 10 ConPTY API and approaches with the additional hidden console wrapper (which seems to be what winpty is). Adriano
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel