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.