cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
4.5k stars 339 forks source link

Cannot bring process-compose to background with Ctrl-B #1483

Open akiross opened 1 month ago

akiross commented 1 month ago

Describe the bug process-compose has a feature that allows to "send the TUI in background" by pressing Ctrl-B (relevant issue). When TUI is on the foreground, Ctrl-B will apparently start a new shell (bash) and when that exists, the TUI will be back. I can do that when running process-compose attach, but if I use devenv up, Ctrl-B will flash a terminal for an instant and then it will go back to the TUI.

To reproduce

  1. devenv init in an empty with v1.2.0
  2. create a simple process like while true; do sleep 1; echo "foo" ; done
  3. devenv up to get into process-compose
  4. press Ctrl-B to put process-compose in background
  5. process-compose won't go in background

Version

devenv 1.2.0 (x86_64-linux)

devenv installed via nixpkgs. My system config is a flake.

sandydoo commented 1 month ago

We launch each process manager in the background, which doesn't seem compatible with this feature.

I don't think we need to background the process to implement our post-process action, and in fact this feature is broken for process-compose, which takes over signal handling entirely. So maybe we can get this fixed.