Cygwin: pipes: fix a bug in raw_write
The buffer pointer is incremented by "chunk", which is what we typically try to write, but this isn't what actually got written. Increment the buffer pointer by what we actually wrote, as returned by NtWriteFile. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
e9d4cb765f
commit
464f7145f6
|
@ -380,7 +380,7 @@ fhandler_pipe::raw_write (const void *ptr, size_t len)
|
|||
buffer doesn't have sufficient space. */
|
||||
if (nbytes_now == 0)
|
||||
set_errno (EAGAIN);
|
||||
ptr = ((char *) ptr) + chunk;
|
||||
ptr = ((char *) ptr) + nbytes_now;
|
||||
nbytes += nbytes_now;
|
||||
}
|
||||
else if (STATUS_PIPE_IS_CLOSED (status))
|
||||
|
|
Loading…
Reference in New Issue