Terminate context in a child process of fork() to replace file descriptors to not interfere with parent process's context

This commit is contained in:
Matt Connolly
2013-08-31 21:17:11 +10:00
parent 0478ee04f4
commit ff2900fd52
10 changed files with 141 additions and 2 deletions

View File

@@ -25,6 +25,7 @@
#if defined ZMQ_USE_KQUEUE
#include <vector>
#include <unistd.h>
#include "fd.hpp"
#include "thread.hpp"
@@ -94,6 +95,11 @@ namespace zmq
kqueue_t (const kqueue_t&);
const kqueue_t &operator = (const kqueue_t&);
#ifdef HAVE_FORK
// the process that created this context. Used to detect forking.
pid_t pid;
#endif
};
typedef kqueue_t poller_t;