WvStreams
|
#include <unistd.h>
#include "wvscatterhash.h"
#include "wvtr1.h"
Go to the source code of this file.
Typedefs | |
typedef wv::function< void(pid_t)> | WvForkCallback |
Functions | |
DeclareWvScatterTable (int) | |
void | add_wvfork_callback (WvForkCallback cb) |
Register a callback to be called during wvfork. More... | |
pid_t | wvfork_start (int *waitfd) |
wvfork_start is just like fork, except that it will block the parent until the child process closes the waitfd, to avoid race conditions. More... | |
pid_t | wvfork (int dontclose1=-1, int dontclose2=-1) |
wvfork() just runs fork(), but it closes all file descriptors that are flagged close-on-exec, since we don't necessarily always run exec() after we fork()... More... | |
pid_t | wvfork (intTable &dontclose) |
Provides support for forking processes.
Definition in file wvfork.h.
void add_wvfork_callback | ( | WvForkCallback | cb | ) |
pid_t wvfork_start | ( | int * | waitfd | ) |
pid_t wvfork | ( | int | dontclose1 = -1 , |
int | dontclose2 = -1 |
||
) |
wvfork() just runs fork(), but it closes all file descriptors that are flagged close-on-exec, since we don't necessarily always run exec() after we fork()...
This fixes the year-old mystery bug where WvTapeBackup caused watchdog reboots because the CHILD process wasn't touching it, and it was already open before the fork()...
Definition at line 71 of file wvfork.cc.
Referenced by WvResolver::findaddr().