diff options
author | Miles Bader <miles@gnu.org> | 1996-01-14 04:48:11 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-01-14 04:48:11 +0000 |
commit | ca7688018fd7e5806f009b4f7b1c05afcc3271c8 (patch) | |
tree | 23a6bb43287f06e44e8b2925307763186bfc501a | |
parent | 25e8145300ec1ad38f82fce22258955e5fedafd4 (diff) |
(pipe_send):
For non-blocking writes, avoid writing more than the user requested.
-rw-r--r-- | libpipe/pipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpipe/pipe.c b/libpipe/pipe.c index 4e52ac04..7f36e5f8 100644 --- a/libpipe/pipe.c +++ b/libpipe/pipe.c @@ -259,7 +259,7 @@ pipe_send (struct pipe *pipe, int noblock, void *source, if (noblock) { size_t left = pipe->write_limit - pipe_readable (pipe, 1); - if (left > data_len) + if (left < data_len) if (data_len <= pipe->write_atomic) return EWOULDBLOCK; else |