in zpipes_client.c, zpipes_client_read returns 0 ambiguously.
zpipes_msg_recv returns NULL on both malloc error and on EINTR (blowing the entire message frame, it looks like). Returning a 0 here looks like a graceful pipe shutdown, and should return an error (-1 with errno set to EIO? It's probably not retryable, so EINTR is probably out.)
Same with a timeout condition -- this should return an error as well, so as to distinguish itself from a graceful pipe close.
in zpipes_client.c, zpipes_client_read returns 0 ambiguously.
zpipes_msg_recv returns NULL on both malloc error and on EINTR (blowing the entire message frame, it looks like). Returning a 0 here looks like a graceful pipe shutdown, and should return an error (-1 with errno set to EIO? It's probably not retryable, so EINTR is probably out.)
Same with a timeout condition -- this should return an error as well, so as to distinguish itself from a graceful pipe close.