Closed garlick closed 4 weeks ago
after initial skim, took awhile to grok the buffer + offset + used variables. Am trying to think of a way to make it grok a little easier. Dunno if a "class" would help? Like a get_data()
function can return data and length, and internally it'll update all things it needs to update and hide that from channel.c
?
That's a pretty good idea. I'll give that a whirl.
@chu11 - per your suggestion, I added an "outbuf" class to libsdexec. It's a tiny thing and purpose-built for use in the channel module so it really didn't feel right to flesh this out as a general purpose container. Let me know if it helps make the code more readable.
I also switched over flux-exec(1) to LOCAL_UNBUF, which should cause any line buffering issues introduced by this PR to cause stdout tests to fail in t2409-sdexec.t
.
Dropping the WIP since I think this has pretty good test coverage now.
Thanks! I'll set MWP.
Attention: Patch coverage is 90.08264%
with 12 lines
in your changes are missing coverage. Please review.
Project coverage is 83.31%. Comparing base (
8c0e8c0
) to head (3438b64
).
This adds output buffering to sdexec.
I'll mark WIP temporarily while I ponder more tests.