> I don't know if this is documented or not but Xlib uses xcb internally > and xcb opens the connection with CLOEXEC
I checked a few other suckless programs to see how they usually handle it but it's not consistent, dwm closes the connection on spawn() (this can be improved with CLOEXEC -- or omitted?) and st doesn't close it before execsh(). > It really doesn't. As you can already see, posix_spawn interface is > absolutely garbagely designed We're in agreement, I only suggested it because presumably it is 1 system call (close) instead of 2 (fcntl+fcntl), but I don't see any value in using it beyond that, and considering the fact that your patch was supposed to "simplify post-lock cmd", it's really not helping. Your suggestion looks fine. - Listeria