Skip to content

@actions/exec: Handle receiving a signal of the child process #2313

@ueokande

Description

@ueokande

Describe the bug
The exec command in @actions/exec does not properly handle the case where a child process exits due to receiving a signal. When a process is terminated by a signal (e.g., SIGTERM or SIGKILL), the exit code is null and only the signal is set.

Currently, @actions/exec handles exit codes and does not handle the signal-based termination case (ref). We can see the following confusing errors:

Error: The process '(tool name)' failed with exit code null

There are numerous reports across GitHub issues:
https://github.com/search?q=%22failed+with+exit+code+null%22&type=issues

Expected behavior

When a process exits due to receiving a signal, @actions/exec should handle it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions