While using GetFileType API upon standard console handle, GetLastError shows error code 187 aka. ERROR_SEM_NOT_FOUND. GetLastError shows 0 (zero) in stable cygwin version. Here is the test code:
#include <Windows.h> #include <stdio.h> int main(void) { SetLastError(0); printf("%d (%d)\n", GetFileType(GetStdHandle(STD_INPUT_HANDLE)), GetLastError()); printf("%d (%d)\n", GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)), GetLastError()); printf("%d (%d)\n", GetFileType(GetStdHandle(STD_ERROR_HANDLE)), GetLastError()); } -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple