Skip to content

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

@dvush

Description

@dvush

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions