bazelisk icon indicating copy to clipboard operation
bazelisk copied to clipboard

Bazelisk does not forward signals and terminate correctly

Open aaron-skydio opened this issue 2 years ago • 1 comments

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. 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.

aaron-skydio avatar Feb 17 '23 21:02 aaron-skydio

The weird part is that a wrapper script would futz about with these signals, instead of just doing execv() and getting out of the way.

Node.js

Oh, that's right.

Node.js can't do execv. Because it's handicapped.

pauldraper avatar Mar 11 '25 15:03 pauldraper