Skip to content

javalib Process#waitFor(timeout) macOS & unix-like os calls should be in a try/finally block #3957

@LeeTibbert

Description

@LeeTibbert

Whilst preparing & testing PR #3954, I noticed that macOS kevent and (recent) unix-like ppoll operating
system calls would leave their respective os data structures open in case of an Exception. Oops!

The data structure does get closed on the success path.

Issue #3944 shows that these os calls can & do return errno values which then cause Exceptions to be thrown.

The fix is to wrap each call in a try/finally block.

I did not do this in PR #3954 because I wanted reviewers to be able to focus on the essential math change.

Instead, I am creating this Issue as a "forget-me-not" and hope to make the change after #3954 settles.

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