Skip to content

Trimming the final newline unconditionally is problematic #1

@dabrahams

Description

@dabrahams

I learned recently if you waitUntilExit without first draining the standard output and error streams the system can deadlock, because it refuses to allow more data to be streamed out of the child process when its output buffers become full. Congratulations on being one of the very rare packages out there that handles this correctly!

When I was looking to see if I could use this package for that solution in my project, I noticed the unconditional trimming of final newlines. There are tools that don't automatically end their output with a newline, where having a final newline or not could be a significant part of the output. See for example find with the -print0 option. Trimming that character should be a choice made by the client of this library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions