1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2026-11-02 08:34:44 +00:00

don't leak file descriptors into runs

This commit is contained in:
Oliver Giles
2017-12-04 20:31:23 +02:00
parent d91816097a
commit 9c92c5b514
2 changed files with 2 additions and 2 deletions

View File

@@ -370,7 +370,7 @@ void Laminar::run() {
sigemptyset(&mask);
sigaddset(&mask, SIGCHLD);
sigprocmask(SIG_BLOCK, &mask, NULL);
int sigchld = signalfd(-1, &mask, 0);
int sigchld = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
srv->addDescriptor(sigchld, [this](const char* buf, size_t sz){
struct signalfd_siginfo* siginfo = (struct signalfd_siginfo*) buf;
// TODO: re-enable assertion when the cause for its triggering