Skip to content

spawn does not create a systemd scope in some situations #1385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dvush opened this issue Apr 3, 2025 · 1 comment
Open

spawn does not create a systemd scope in some situations #1385

dvush opened this issue Apr 3, 2025 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@dvush
Copy link

dvush commented Apr 3, 2025

I've noticed that OOM killer would kill niri and it lead me to this PR #216

When I spawn terminal using the following binding Mod+Return { spawn "alacritty"; } it gets its own scope. This works as expected.

But when I spawn using tofi launcher scope is not created and all the processes are the children of niri.
I've tried the following way of spawning

Mod+D { spawn "bash" "-c" "tofi-run | xargs -r nohup &"; }
Mod+D { spawn "bash" "-c" "tofi-run | xargs bash -c"; }

Thankfully niri has niri msg action spawn that works and now I use

    Mod+D { spawn "bash" "-c" "tofi-run | xargs niri msg action spawn --"; }

I have a suspicion that this might be a problem.

I thought that "bash -c" might cause the issue but when I spawn terminal using Mod+Return { spawn "bash" "-c" "alacritty"; } it creates a scope.

System Information

  • niri version: niri 25.02 (unknown commit)
  • Distro: Arch
  • GPU: NVIDIA 3090
  • CPU: AMD Ryzen Threadripper 3970X
@dvush dvush added the bug Something isn't working label Apr 3, 2025
@YaLTeR
Copy link
Owner

YaLTeR commented Apr 3, 2025

niri puts the child into a scope. Whatever happens next is up to the child, but it should generally remain in the scope. At least this works for me with fuzzel.

@YaLTeR YaLTeR added the question Further information is requested label Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants