returns -1 with EAGAIN when mandatory is set and pipe is full