#endif
)
{
+ GNUNET_break (0);
LOG (GNUNET_ERROR_TYPE_ERROR,
_
("Fatal internal logic error, process hangs in `%s' (abort with CTRL-C)!\n"),
"select");
- GNUNET_break (0);
}
#ifndef MINGW
tv.tv_sec = timeout.rel_value / GNUNET_TIME_UNIT_SECONDS.rel_value;
fh = (struct GNUNET_DISK_FileHandle *) GNUNET_CONTAINER_slist_get (&i,
NULL);
- if (fh->type == GNUNET_PIPE)
+ if (fh->type == GNUNET_DISK_HANLDE_TYPE_PIPE)
{
/* Read zero bytes to check the status of the pipe */
LOG (GNUNET_ERROR_TYPE_DEBUG, "Reading 0 bytes from the pipe 0x%x\n",
fh = (struct GNUNET_DISK_FileHandle *) GNUNET_CONTAINER_slist_get (&i,
NULL);
- if (fh->type == GNUNET_PIPE)
+ if (fh->type == GNUNET_DISK_HANLDE_TYPE_PIPE)
{
if (!PeekNamedPipe (fh->h, NULL, 0, NULL, &dwBytes, NULL))
{
i, readArray[i]->h, bret, waitstatus, error);
if (bret == 0)
{
- if (error != ERROR_BROKEN_PIPE)
+ /* TODO: either add more errors to this condition, or eliminate it
+ * entirely (failed to peek -> pipe is in serious trouble, should
+ * be selected as readable).
+ */
+ if (error != ERROR_BROKEN_PIPE && error != ERROR_INVALID_HANDLE)
continue;
}
else if (waitstatus <= 0)
fh = (struct GNUNET_DISK_FileHandle *) GNUNET_CONTAINER_slist_get (&t,
NULL);
- if (fh->type == GNUNET_PIPE)
+ if (fh->type == GNUNET_DISK_HANLDE_TYPE_PIPE)
{
CancelIo (fh->h);
}