Skip to content

CommandLineUtils.call() does not ensure all pumpers are waited on #398

Description

@elharo

In CommandLineUtils, the call() method calls waitUntilDone() on inputFeeder, outputPumper, and errorPumper sequentially (lines 298-303). If the first call throws (e.g., InterruptedException), the remaining pumpers are never waited on, leaving their threads potentially running.

The commented-out code above (lines 277-297) shows the original author intended a try-finally chain, but it was disabled.

Fix: wrap the calls in a try-finally to ensure all pumpers are waited on even when an earlier one throws.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions