Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tlsalmin
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
tlsalmin
2y ago
First nitpick: static int pipe_fd[2] = {0}; 0 is valid fd, so I recommend initializing fds to -1. signalfd was just off-hand mentioned, but for writing anything larger, like lets say a daemon process, it keeps things close to all th
2.
▲
by
tlsalmin
4y ago
This is getting into taste territory but sure just getting the signal in epoll_pwait removes the need for FD reading. But introduces the need for the thread local global context and the need to handle EINTR from epoll right? I can see how c
3.
▲
by
tlsalmin
4y ago
I have to disagree here. Not recommending signalfd for the mentioned use cases might be reasonable, just as reasonable as it is to use threads for a specific use case. For a single threaded non-blocking-FD using client/server signalfd
4.
▲
by
tlsalmin
4y ago
Just skimmed through the article, since I'm just here to testify that the most important revelation for me on writing APIs was that you can put and epoll_fd in an epoll_fd. This allows the API to have e.g. a single epoll_fd that contai
5.
▲
by
tlsalmin
5y ago
This is why I opted for Shelly on my house build. The dimmers keep dimming and everything works regularly without a hub/HA/Wifi. Leaving the modules inside the light switches. No need for special bulbs and having switches with spr