diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2023-02-26 07:09:29 -0500 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2023-03-01 13:07:58 -0500 |
commit | 7e3387516d32c746cd1c6588be71a9ed0d70a02d (patch) | |
tree | 74102fa51f0291fb61a004f31d0fa9464c99f933 /README.txt | |
parent | 4b80ca684eea86fb9e64d6ab5ec606bb403cb4cd (diff) | |
download | sploit-7e3387516d32c746cd1c6588be71a9ed0d70a02d.tar.gz sploit-7e3387516d32c746cd1c6588be71a9ed0d70a02d.zip |
Add special cases for read(size <= 0)
A read of 0 isn't particularly useful, but it is weird that it will
cause a BrokenPipeError. Instead, it makes more sense to just return an
empty string.
A read of <0 would normally read until EOF, but we already have that
feature in readall() and it wouldn't be particularly useful here. A
similar functionality of reading the entire current contents of the
buffer is useful, though. This is already implemented in
readall_nonblock() and this would be a nice user-facing way of calling
that.
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
Diffstat (limited to 'README.txt')
0 files changed, 0 insertions, 0 deletions