changed the way to fix ERROR_BROKEN_PIPE.

improved socket error translation
This commit is contained in:
2012-12-28 08:39:41 +00:00
parent eb28009952
commit 3aec7946c3
28 changed files with 394 additions and 1455 deletions

View File

@ -1729,16 +1729,6 @@ static qse_ssize_t awk_rio_console (
if (sio) qse_sio_close (sio);
}
#if defined(_WIN32)
/* DIRTY HACK FOR WIN32.
* ReadFile returns failure with ERROR_BROKEN_PIPE
* when an anonymous pipe is closed. it doesn't return EOF.
* Let me handle that specially here for console only.
*/
if (nn <= -1 &&
qse_sio_geterrnum ((qse_sio_t*)riod->handle) == QSE_SIO_EPIPE) return 0;
#endif
return nn;
}