Skip to content

os/exec: Failure in Cmd.Start() can orphan descriptors #3468

@gopherbot

Description

@gopherbot

by briandellisanti:

Inspection of os/exec.Cmd.Start() shows that it will orphan descriptors created
internally if it fails to complete successfully. Finalization will close the descriptors
eventually, but it would be better if they were closed immediately.

Specifically, if os.StartProcess() or the setupFd methods return errors, Start() bails
out immediately.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions