… | |
… | |
4 | <head> |
4 | <head> |
5 | <title>libev</title> |
5 | <title>libev</title> |
6 | <meta name="description" content="Pod documentation for libev" /> |
6 | <meta name="description" content="Pod documentation for libev" /> |
7 | <meta name="inputfile" content="<standard input>" /> |
7 | <meta name="inputfile" content="<standard input>" /> |
8 | <meta name="outputfile" content="<standard output>" /> |
8 | <meta name="outputfile" content="<standard output>" /> |
9 | <meta name="created" content="Thu Nov 22 13:28:34 2007" /> |
9 | <meta name="created" content="Fri Nov 23 05:35:59 2007" /> |
10 | <meta name="generator" content="Pod::Xhtml 1.57" /> |
10 | <meta name="generator" content="Pod::Xhtml 1.57" /> |
11 | <link rel="stylesheet" href="http://res.tst.eu/pod.css"/></head> |
11 | <link rel="stylesheet" href="http://res.tst.eu/pod.css"/></head> |
12 | <body> |
12 | <body> |
13 | <div class="pod"> |
13 | <div class="pod"> |
14 | <!-- INDEX START --> |
14 | <!-- INDEX START --> |
… | |
… | |
272 | <dd> |
272 | <dd> |
273 | <p>This function reinitialises the kernel state for backends that have |
273 | <p>This function reinitialises the kernel state for backends that have |
274 | one. Despite the name, you can call it anytime, but it makes most sense |
274 | one. Despite the name, you can call it anytime, but it makes most sense |
275 | after forking, in either the parent or child process (or both, but that |
275 | after forking, in either the parent or child process (or both, but that |
276 | again makes little sense).</p> |
276 | again makes little sense).</p> |
277 | <p>You <i>must</i> call this function after forking if and only if you want to |
277 | <p>You <i>must</i> call this function in the child process after forking if and |
278 | use the event library in both processes. If you just fork+exec, you don't |
278 | only if you want to use the event library in both processes. If you just |
279 | have to call it.</p> |
279 | fork+exec, you don't have to call it.</p> |
280 | <p>The function itself is quite fast and it's usually not a problem to call |
280 | <p>The function itself is quite fast and it's usually not a problem to call |
281 | it just in case after a fork. To make this easy, the function will fit in |
281 | it just in case after a fork. To make this easy, the function will fit in |
282 | quite nicely into a call to <code>pthread_atfork</code>:</p> |
282 | quite nicely into a call to <code>pthread_atfork</code>:</p> |
283 | <pre> pthread_atfork (0, 0, ev_default_fork); |
283 | <pre> pthread_atfork (0, 0, ev_default_fork); |
284 | |
284 | |