diff options
author | root <root> | 2007-11-29 17:28:13 +0000 |
---|---|---|
committer | root <root> | 2007-11-29 17:28:13 +0000 |
commit | 756a6378f76a80c595335d4a78ab426cc44d247d (patch) | |
tree | 8dfc566a50d530e4c5ca45a2ee3f97e47b314927 /ev.html | |
parent | 8d0f4d263d9a5601bb7d419e7db00970e288cb7e (diff) |
implement EVFLAG_FORKCHECK
Diffstat (limited to 'ev.html')
-rw-r--r-- | ev.html | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -6,7 +6,7 @@ <meta name="description" content="Pod documentation for libev" /> <meta name="inputfile" content="<standard input>" /> <meta name="outputfile" content="<standard output>" /> - <meta name="created" content="Thu Nov 29 13:21:20 2007" /> + <meta name="created" content="Thu Nov 29 18:28:02 2007" /> <meta name="generator" content="Pod::Xhtml 1.57" /> <link rel="stylesheet" href="http://res.tst.eu/pod.css"/></head> <body> @@ -328,6 +328,23 @@ override the flags completely if it is found in the environment. This is useful to try out specific backends to test their performance, or to work around bugs.</p> </dd> + <dt><code>EVFLAG_FORKCHECK</code></dt> + <dd> + <p>Instead of calling <code>ev_default_fork</code> or <code>ev_loop_fork</code> manually after +a fork, you can also make libev check for a fork in each iteration by +enabling this flag.</p> + <p>This works by calling <code>getpid ()</code> on every iteration of the loop, +and thus this might slow down your event loop if you do a lot of loop +iterations and little real work, but is usually not noticable (on my +Linux system for example, <code>getpid</code> is actually a simple 5-insn sequence +without a syscall and thus <i>very</i> fast, but my Linux system also has +<code>pthread_atfork</code> which is even faster).</p> + <p>The big advantage of this flag is that you can forget about fork (and +forget about forgetting to tell libev about forking) when you use this +flag.</p> + <p>This flag setting cannot be overriden or specified in the <code>LIBEV_FLAGS</code> +environment variable.</p> + </dd> <dt><code>EVBACKEND_SELECT</code> (value 1, portable select backend)</dt> <dd> <p>This is your standard select(2) backend. Not <i>completely</i> standard, as |