[Vm-dev] Identify console executable and standard one

K K Subbu kksubbu.ml at gmail.com
Mon Apr 16 03:50:30 UTC 2018


On Sunday 15 April 2018 11:42 PM, Eliot Miranda wrote:
>>
>> On Windows in sqFileStdioHandlesInto() in sqWin32FilePrims.c:
>>
>> files[0].sessionID = thisSession;
>> files[0].file = GetStdHandle(STD_INPUT_HANDLE);
>> files[0].writable = false;
>> files[0].lastOp = 0; /* unused on win32 */
>> files[0].isStdioStream = GetConsoleMode(files[0].file, &mode) != 0;
>> AddHandleToTable(win32Files, files[0].file);
> 
> This could be causing problems, because AFAIA 
> GetConsoleMode(files[0].file, &mode) is no longer reliable.  Can you test?

I believe _isatty(fd) from io.h is the syscall on Windows:

  https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/isatty

HTH .. Subbu


More information about the Vm-dev mailing list