… | |
… | |
411 | or setgid) then libev will \fInot\fR look at the environment variable |
411 | or setgid) then libev will \fInot\fR look at the environment variable |
412 | \&\f(CW\*(C`LIBEV_FLAGS\*(C'\fR. Otherwise (the default), this environment variable will |
412 | \&\f(CW\*(C`LIBEV_FLAGS\*(C'\fR. Otherwise (the default), this environment variable will |
413 | override the flags completely if it is found in the environment. This is |
413 | override the flags completely if it is found in the environment. This is |
414 | useful to try out specific backends to test their performance, or to work |
414 | useful to try out specific backends to test their performance, or to work |
415 | around bugs. |
415 | around bugs. |
|
|
416 | .ie n .IP """EVFLAG_FORKCHECK""" 4 |
|
|
417 | .el .IP "\f(CWEVFLAG_FORKCHECK\fR" 4 |
|
|
418 | .IX Item "EVFLAG_FORKCHECK" |
|
|
419 | Instead of calling \f(CW\*(C`ev_default_fork\*(C'\fR or \f(CW\*(C`ev_loop_fork\*(C'\fR manually after |
|
|
420 | a fork, you can also make libev check for a fork in each iteration by |
|
|
421 | enabling this flag. |
|
|
422 | .Sp |
|
|
423 | This works by calling \f(CW\*(C`getpid ()\*(C'\fR on every iteration of the loop, |
|
|
424 | and thus this might slow down your event loop if you do a lot of loop |
|
|
425 | iterations and little real work, but is usually not noticable (on my |
|
|
426 | Linux system for example, \f(CW\*(C`getpid\*(C'\fR is actually a simple 5\-insn sequence |
|
|
427 | without a syscall and thus \fIvery\fR fast, but my Linux system also has |
|
|
428 | \&\f(CW\*(C`pthread_atfork\*(C'\fR which is even faster). |
|
|
429 | .Sp |
|
|
430 | The big advantage of this flag is that you can forget about fork (and |
|
|
431 | forget about forgetting to tell libev about forking) when you use this |
|
|
432 | flag. |
|
|
433 | .Sp |
|
|
434 | This flag setting cannot be overriden or specified in the \f(CW\*(C`LIBEV_FLAGS\*(C'\fR |
|
|
435 | environment variable. |
416 | .ie n .IP """EVBACKEND_SELECT"" (value 1, portable select backend)" 4 |
436 | .ie n .IP """EVBACKEND_SELECT"" (value 1, portable select backend)" 4 |
417 | .el .IP "\f(CWEVBACKEND_SELECT\fR (value 1, portable select backend)" 4 |
437 | .el .IP "\f(CWEVBACKEND_SELECT\fR (value 1, portable select backend)" 4 |
418 | .IX Item "EVBACKEND_SELECT (value 1, portable select backend)" |
438 | .IX Item "EVBACKEND_SELECT (value 1, portable select backend)" |
419 | This is your standard \fIselect\fR\|(2) backend. Not \fIcompletely\fR standard, as |
439 | This is your standard \fIselect\fR\|(2) backend. Not \fIcompletely\fR standard, as |
420 | libev tries to roll its own fd_set with no limits on the number of fds, |
440 | libev tries to roll its own fd_set with no limits on the number of fds, |