WvStreams
wvfork.h
Go to the documentation of this file.
1 /* -*- Mode: C++ -*-
2  * Worldvisions Weaver Software:
3  * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4  */
9 #ifndef __WVFORK_H
10 #define __WVFORK_H
11 
12 #ifndef _WIN32
13 #include <unistd.h>
14 #else
15 typedef int pid_t;
16 #endif
17 
18 #include "wvscatterhash.h"
19 #include "wvtr1.h"
20 
21 DeclareWvScatterTable(int);
22 typedef wv::function<void(pid_t)> WvForkCallback;
23 
32 extern void add_wvfork_callback(WvForkCallback cb);
33 
42 extern pid_t wvfork_start(int *waitfd);
43 
53 extern pid_t wvfork(int dontclose1 = -1, int dontclose2 = -1);
54 extern pid_t wvfork(intTable &dontclose );
55 
56 #endif
add_wvfork_callback
void add_wvfork_callback(WvForkCallback cb)
Register a callback to be called during wvfork.
Definition: wvfork.cc:51
wvfork
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,...
Definition: wvfork.cc:71
wvfork_start
pid_t wvfork_start(int *waitfd)
wvfork_start is just like fork, except that it will block the parent until the child process closes t...
Definition: wvfork.cc:81