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:
@@ -44,6 +44,13 @@ namespace zmq
|
||||
void send (const command_t &cmd_);
|
||||
int recv (command_t *cmd_, int timeout_);
|
||||
|
||||
#ifdef HAVE_FORK
|
||||
// close the file descriptors in the signaller. This is used in a forked
|
||||
// child process to close the file descriptors so that they do not interfere
|
||||
// with the context in the parent process.
|
||||
void forked() { signaler.forked(); }
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
// The pipe to store actual commands.
|
||||
|
||||
Reference in New Issue
Block a user