bazelbuild / bazelbuild/bazelisk

Bazelisk does not forward signals and terminate correctly

Open
#429 1 comment 0 reactions 0 assignees View on GitHub
P2 type:bug
Dominant language
Go
Stars
2.7k
Forks
424
PR merge metrics
No merged PRs in 30d

Description

For example, when invoking `bazel run` with an interactive binary target (for example a python repl), the expectation is that `Ctrl-C` should 1) send SIGINT to the actual executed process, and 2) allow it to continue executing if it handles SIGINT in some nontrivial way (e.g. for a python repl, this interrupts the currently executing command and presents a new python prompt).

This is entirely due to the spawning logic in `bazelisk.js` [here](https://github.com/bazelbuild/bazelisk/blob/a08215b5411f2bf26297859c090654f170e0a5c0/bazelisk.js#L53-L66). Running the same bazel target by invoking that native bazelisk binary directly (e.g. `/usr/lib/node_modules/@bazel/bazelisk/bazelisk-linux_amd64 run ...`) does not have this issue.

Contributor guide

Open the contributing guide

Research direction

Read bazelisk.js lines 53-66, focusing on the spawning logic and how it differs from invoking the native bazelisk binary directly. Reproduce the issue with an interactive target such as a Python REPL, verify that Ctrl-C reaches the executed process and allows it to continue after handling SIGINT, and compare the behavior with the native binary.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.