Re: [hackers] [slock] simplify post-lock cmd and die if it fails || NRK

From: Listeria monocytogenes <listeria_AT_disroot.org>
Date: Thu, 24 Apr 2025 03:52:19 +0000

> 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
Received on Thu Apr 24 2025 - 05:52:19 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 24 2025 - 06:00:41 CEST