Closed cyb3rd4d closed 4 years ago
Hmm, it seems like our double-fork logic is incorrect. We should waitpid
in the parent, not in the child. The child should execute the grandchild and then exit.
https://github.com/emersion/kanshi/blob/e55b5847a07bc3ea2dc19f3cdce8d88c8aa2f9ca/main.c#L97
Funny, I just noticed the same thing. I really wanted to give some information on the subprocess, which you can only do if you wait for it. I guess it was useful for debugging.
We could either fork a third time, or just stop trying to give this exit info. Debugging can be done in the invoked command anyway.
stop trying to give this exit info
Yeah, I'd prefer to do that.
Wish... fulfilled :-) #85
Hello
My kanshi configuration seems to be a little bit problematic. I run kanshi on sway, and I need to move my workspaces depending on the profile. Here is my configuration file:
Kanshi works fine, executes the swaymsg commands, but sometimes the kanshi process dies. So I started to look for some clues and I found that it generated zombie processes:
I run Kanshi 1.1.0 on Arch (community repository, not AUR). I can post the output of a
strace
if you need.