How can one create a new file descriptor from an existing file descriptor such that the new descriptor does not share the same internal file structure/entry in the file table? Specifically ...
The following C file gives a bogus result when NUL is piped to it:
printf("_isatty = %d\n", _isatty(0));
C:\Users\Edward\Dev\nulltest> test.exe < NUL
_isatty = 64
I am compiling a program on Windows with Mingw. How can I get the access mode for an open file descriptor?
I want to port my code from linux to windows. It is something like this:
void SetNonBlocking( int filehandle )
fhFlags = fcntl(filehandle,F_GETFL);