I want to port my code from linux to windows. It is something like this:
void SetNonBlocking( int filehandle )
{
int fhFlags;
fhFlags = fcntl(filehandle,F_GETFL);
if (fhFlags < 0)
{
perror("fcntl(F_GETFL)");
exit(1);
}
fhFlags |= O_NONBLOCK;
if (fcntl(filehandle,F_SETFL,fhFlags) < 0)
{
perror("fcntl(F_SETFL)");
exit(1);
}
return;
}
Now I want have same in windows. Any ideas? Actualy my filehandle is read side of pipe which is created via WinApi CreatePipe
method.