688d943a52
This patch fixes the following problem: Commit 9636c426 refactored the pipe code especially to make sure to call WriteFile only with chunks matching the maximum atomic write count. This accidentally introduced a small change in behaviour on blocking pipes due to the success case falling through into the error case. Rather then writing atomic chunks until all bytes are written, the code immediately broke from the loop after writing the first chunk, basically the same as in case of non-blocking writes. This behaviour is not compliant to POSIX which requires "Write requests to a pipe or FIFO [...] * If the O_NONBLOCK flag is clear, a write request may cause the thread to block, but on normal completion it shall return nbyte." Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin