lockfile descriptor persist through signal system
bug
> I noticed that sometimes this happens:
>
> <img width="771" height="96" alt="Image" src="https://github.com/user-attachments/assets/050c997a-c5be-4f4a-8238-4d35a816b1f7" />
>
> If I do the `yabai --stop-service` one is gone but the other remains
> Even killing the process with `pkill yabai` doesn't do anything.
> One process is listed forever.
> I guess this is the reason both processes fight for lock.
>
> I also noticed that often times when I was connecting/disconnecting external monitor I saw additional yabai process (without icon) that disappeared after about 5 seconds
>
> <img width="765" height="108" alt="Image" src="https://github.com/user-attachments/assets/5510e389-476f-4e83-b703-09fc93892514" />
>
> I rebooted my machine and in my script for `display_changed` event
> ```
> yabai -m signal --add event=display_changed action="$HOME/.local/switch-flow/scripts/handle_display_changed.sh" &
> ```
> note: this screenshot is taken after reboot so don't mind the PID being different from the other screenshot.
>
> I added `sleep 5` before `yabai -m query --windows id,app,title`
> Now when I connect/disconnect the external monitor the "additional" yabai process doesn't show up.
> Maybe this will give you some hints.
> Perhaps too much was happening after display_changed event in my setup and that overwhelmed yabai.
> It's quite possible that I haven't noticed this before because I started to use external monitor few weeks ago and that enforced some changes in my setup.
_Originally posted by @kmiterror in [#2770](https://github.com/asmvik/yabai/issues/2770#issuecomment-4168801536)_
关闭于 2026-04-18 1 条评论