1
0
mirror of https://github.com/danog/byte-stream.git synced 2024-12-02 09:17:50 +01:00
Commit Graph

10 Commits

Author SHA1 Message Date
eaec19ea30 Add async readline/echo and add composer commands 2019-07-15 16:16:07 +02:00
Niklas Keller
c75af3778b
Fix ResourceOutputStream closed detection (#60)
The previous mechanism with feof doesn't work for systemd launched processes.

Fixes #58.
2019-06-03 23:45:17 +02:00
Niklas Keller
24484fa356 Move testClosedRemoteSocketWithFork to ResourceInputStreamTest
Whether writing to the socket fails is implementation defined, see https://stackoverflow.com/a/4022160/2373138.

Shutting down the read side of the socket generally doesn't have any effect on the peer, seems like this is due to the local host implementation on Linux.
2019-06-03 23:24:59 +02:00
Niklas Keller
d161589772 Apply PSR-2 2018-09-22 16:04:00 +02:00
Aaron Piotrowski
da357d1579
Proper fix for remote closed streams
Fixes #40. Streams on MacOS (and possibly FreeBSD) that are closed by the remote still allow writing, returning a non-zero from fwrite(). EOF then is false, since data was written to the buffer. EOF needed to be checked before calling fwrite().
2018-04-03 19:08:18 -05:00
Niklas Keller
1184827fd8 Revert "Update test"
This reverts commit 5ba0469d7a.

The test should verify that the socket is detected as closed even if the
work is still alive and has an open FD.
2018-04-03 22:12:42 +02:00
Aaron Piotrowski
5ba0469d7a
Update test 2018-04-03 12:23:39 -05:00
Niklas Keller
43a93e6240 Add closed stream test with leaked FDs 2018-04-03 18:30:21 +02:00
Niklas Keller
56e814943a Add tests for dead socket detection
Relates to #40.
2018-04-03 18:20:40 +02:00
Niklas Keller
9e90d1fa09 Add tests, fix ResourceOutputStream writable check 2017-05-16 23:27:48 +02:00