This should fix everything that was broken by the premature merge of my branch, as well as implementing the readline() change.
Make readline() always return complete lines instead of partial ones,…
… even if we have to block
adjust FIXME comment
Next shot at fixing io_readline_encoded_string().
All regression should be gone and HTTP::Easy still works.
I also identified a potential problem already present in the
Purge set_eof from IO subsystem.
Being at EOF is something the underlying system handle keeps track of, and not
something we should be able to affect from userspace.
If nobody deals with this pull request in the next three days, I will merge it. :)
Replace raw_reads from IO_BUFFER with PIO_BF_UNDERFLOW flag
Implement get_bool(), eof(), is_open() in Handle PMC, not its subclasses
Set EOF in io_filehandle_read_b()
Change test to match new get_bool() semantics
Fix bug in Parrot_io_readline_s()
io_verify_has_read_buffer() expects a flags argument, not the buffer size
Consider buffered sockets at EOF if the last read failed
Check for is_eof() in io_readline_encoded_string() instead of the pri…
Wow. That ended up being slightly more work that I set out to do.
Please wait with the merge to master until others have had time to review these changes.
In particular, the following semantics have changed:
Stuff I still need to work on:
Stuff to think about:
I'm taking a shot at the 'stuff to think about' in the branch https://github.com/gerdr/parrot/commits/io-refactor
What is the status of this? It is not clear to me what needs to happen to close this issue. Can somebody update the description with details?
The pull request as-is could in principle be merged: It test cleanly and fixes #942.
However, there's still some more stuff I want to do, in particular aligning io_read_encoded_string() with the new io_readline_encoded_string() semantics and adding tests.
I don't particularly like the factoring, though, which is why I started https://github.com/gerdr/parrot/commits/io-refactor (which right now breaks GzipHandle but otherwise passes the tests as well).
I'll try to get back to this sooner rather than later, but no guarantees...
Can you please give a status update about this, @gerdr ? Thank you!
hey @gerdr, there's still a pull request open for rakudo that references this bug (rakudo/rakudo#107).
Is the branch still interesting?
I fixed up this branch in gerdr/socket-readline-gh944.
One blocker though: parrot_nci_thunk_gen hangs after having written the buffer. It could be the read from the pipe missing it's eof.
./parrot_nci_thunk_gen ... --output=src/glut_nci_thunks.c < src/glut_nci_thunks.nci