Trying to waitpid before reading the piped content will lead to a blocked pipe and get the child process "stuck". So it should be read BEFORE waitpid is called. Further there was a bug within the reallocation logic leading to heap corruption because the comparison size did not include the just read chunk, leading to heap corruption, which itself led to reallocate failing.
What's Changed:
Type of Change:
[x] Bug fix
[ ] New feature
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
#
Housekeeping:
[x] Tests have been updated to reflect the changes done within this PR (if applicable).
[ ] Documentation has been updated to reflect the changes done within this PR (if applicable).
Trying to waitpid before reading the piped content will lead to a blocked pipe and get the child process "stuck". So it should be read BEFORE waitpid is called. Further there was a bug within the reallocation logic leading to heap corruption because the comparison size did not include the just read chunk, leading to heap corruption, which itself led to reallocate failing.
What's Changed:
Type of Change:
#
Housekeeping: