Skip to content

Commit

Permalink
Temporarily change istty
Browse files Browse the repository at this point in the history
To assist with ReactOS we will change istty(). It now
fails to detect tty in git's bash shell, but works as
expected in Windows console.
  • Loading branch information
lundman committed Jun 1, 2018
1 parent 5c3a8bb commit 56a8056
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ZFSin/zfs/lib/libspl/posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ int win_isatty(HANDLE h)
{
DWORD mode;
int ret;

#if 0
const unsigned long bufSize = sizeof(DWORD) + MAX_PATH * sizeof(WCHAR);
BYTE buf[sizeof(DWORD) + MAX_PATH * sizeof(WCHAR)];
PFILE_NAME_INFO pfni = (PFILE_NAME_INFO)buf;
Expand All @@ -810,6 +810,14 @@ int win_isatty(HANDLE h)

//printf("ret %d Got name as '%S'\n", ret, fn); fflush(stdout);
return ret;
#else

ret = ((GetFileType(h) & ~FILE_TYPE_REMOTE) == FILE_TYPE_CHAR);

#endif
fprintf(stderr, "%s: return %d\r\n", __func__, ret);
fflush(stderr);
return ret;
}

int setrlimit(int resource, const struct rlimit *rlp)
Expand Down

0 comments on commit 56a8056

Please sign in to comment.