ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] Script execution leaks pipe FDs

mbethke opened this issue · comments

This bug just started turning on my system (Arch Linux, Sway 1.9-1, swaync 0.10.1-1): after about 9 days of uptime, every notification is accompanied by an error message saying

Failed to run script: example-script
Output: Too many open files

Swaync's /proc/$PID/fd directory currently shows 1018 open files, 1002 of which are pipes.

My Vala-fu is weak, but my suspicion of execute_command in src/functions.vala is still strong ;) It looks like std_output isn't being closed if something goes wrong between spawning the process and setting up the child watch, although I can't think of too many things that could. As notoriously fiddly as this spawning stuff is especially in a portable way, I wouldn't be surprised if it was a GTK/Vala bug either.

Here's my config in case it helps.

Are you running the latest version? This was fixed in #388