`@actions/exec`: Handle receiving a signal of the child process
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/exec/src/toolrunner.ts around lines 504-509 and trace how child-process exitCode and signal values are handled. Reproduce termination by SIGTERM or SIGKILL and add coverage for the expected signal-aware behavior; done means the error no longer reports a misleading null exit code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100