aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorLudvig Michaelsson <ludvig.michaelsson@gmail.com>2021-11-21 10:55:20 +0100
committerSimon Ser <contact@emersion.fr>2021-11-25 12:09:12 +0100
commitf627cd77d6a889e97eb1e6b889322e70482d441c (patch)
tree600847a4debe819c340351b766a1ce8c8dc18b65 /sway
parent94dc486f0e2eb1693b64dcc84309794f17d0f79b (diff)
swaybar: signal status command's process group
Make the status command a process group leader and change the kill(2) calls to target the new process group. Signals sent by swaybar will then be received by both the status command and its children, if any. While here, check the result of fork(2). Without this, children spawned by the status command may not receive the signals sent by swaybar. As a result, these children may be orphaned on reload. The issue could be shown by setting the bar to bar { status_command i3status | tee /tmp/i3status.out } which would leave orphaned processes for each reload of sway $ ps o pid,ppid,cmd | grep i3status | grep -v grep 43633 43624 sh -c i3status | tee /tmp/i3status.out 43634 43633 i3status 43635 43633 tee /tmp/i3status.out $ swaymsg reload $ ps o pid,ppid,cmd | grep i3status | grep -v grep 43634 1 i3status 43635 1 tee /tmp/i3status.out 43801 43788 sh -c i3status | tee /tmp/i3status.out 43802 43801 i3status 43803 43801 tee /tmp/i3status.out This fixes #5584.
Diffstat (limited to 'sway')
0 files changed, 0 insertions, 0 deletions