[Interest] proper (silent) exit in response to SIGHUP?

René J. V. Bertin rjvbertin at gmail.com
Fri Oct 12 20:37:52 CEST 2018

Thiago Macieira wrote:

> They're not. They're just the first link I found when googling for "signal
> safe". The official list comes from POSIX.

I did some homework of my own. Turns out these signals are also known as "ANSI 
signals" or "standard C signals" and are actually part of standard (at least 
some, including SIGINT and SIGTERM, but not SIGHUP). So they do exist on MS 
Windows. With very similar limitations, even.

> QFSW on BSD uses kqueue, so one fd per QFSW.

Indeed, so in something like an IDE that wants to monitor an entire source tree 
for changes you quickly run out of available file descriptors (was the case too 
with Qt4 on Mac). That can be catastrophic (QThreadPipe will start failing).
That's the reason I was hoping to be clever and use something other than a set 
of 2 file descriptors for an anonymous pipe.

> Trivia: FreeBSD has eventfd, but it's not available for FreeBSD-native
> applications. It's only available for Linux ones.

Hmmm, I thought epoll-shim provided an implementation?

> If you meant "emit a signal", then it's one of the two:

Yes, a queued connection, evidently. It's not immediately evident from the 
documentation that this allocates memory (if you don't already know it).


More information about the Interest mailing list