Comments (4)
It does seem to be working some of the time. I've yet to determine why is it not working all the time. Some scripts correctly respond to SIGINT when run but they don't when run via devbox run
.
from devbox.
This seems similar to the issues that this PR fixed in dagger: dagger/dagger#5712
Their change is essentially doing the following to nix/run.go:
cmd := exec.CommandContext(ctx, shPath, "-c", cmdWithArgs)
cmd.Env = envPairs
cmd.Dir = projectDir
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Cancel = func() error {
return syscall.Kill(cmd.Process.Pid, syscall.SIGTERM)
}
With my limited testing, this seems to fix the issue.
from devbox.
Thanks for the submitting a PR with your fix. I'd still like to understand a bit more why this is happening. Could you provide a few more details?
- What's the exact script that's not responding to SIGINT?
- What shell are you using (for running devbox and the script)?
- Are you sending SIGINT by pressing ctrl-c in the shell? Or are you signaling the devbox process directly?
- Is this happening on macOS or Linux?
When I try to repro using this config:
{
"shell": {
"scripts": {
"zzz": "/bin/sleep 5"
}
}
}
and run devbox run zzz
followed by ctrl-c, the sleep process exits. This is what I'd expect because the shell should be signaling the entire process group.
from devbox.
Related Issues (20)
- [Bug]: export of fish shell environment variables do not always works as intended HOT 5
- [Question]: Can devbox support GNU Guix as a backend store instead of Nix? HOT 2
- [Feature]: Create development templates for Bun HOT 1
- [Package Issue Report]: php81Extensions.gd HOT 1
- [Bug]: Issue with Poetry shell using devcontainer or Docker image HOT 2
- Failing to add packages due to Go unmarshalling error HOT 1
- Ruby 2.7 throws the error `GLIBC_2.38' not found HOT 3
- [Python-pip] I can't install toga HOT 1
- [Question]: Can I remotely connect to devbox services using Visual Studio Code's remote connection extentions? HOT 6
- Support non-root setup HOT 3
- Cannot install pip-tools for Python 3.12
- Poetry erroneously recommended
- Installed programs are not available
- Conflicting Python recommendations HOT 1
- Stop setting LD_LIBRARY_PATH and LIBRARY_PATH
- Dozer CLI for building, deploying and maintaining real-time data products
- best way to get store path for resource HOT 5
- devbox install reports Error: "nix print-dev-env ..." HOT 3
- Hide banner message from python plugin HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devbox.