mirror of
				https://github.com/zeromq/libzmq.git
				synced 2025-10-28 19:52:00 +01:00 
			
		
		
		
	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:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Matt Connolly
					Matt Connolly