#include <assert.h>
#include <errno.h>
-#include <fcntl.h>
#include <poll.h>
#include <signal.h>
#include <stdio.h>
// (This isn't strictly required, but it makes it easier to debug that indeed
// SIGUSR1 was what woke us up.)
sigset_t set;
+ sigemptyset(&set);
sigaddset(&set, SIGHUP);
int err = pthread_sigmask(SIG_BLOCK, &set, NULL);
if (err != 0) {