1 | .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) |
1 | .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30) |
2 | .\" |
2 | .\" |
3 | .\" Standard preamble: |
3 | .\" Standard preamble: |
4 | .\" ======================================================================== |
4 | .\" ======================================================================== |
5 | .de Sp \" Vertical space (when we can't use .PP) |
5 | .de Sp \" Vertical space (when we can't use .PP) |
6 | .if t .sp .5v |
6 | .if t .sp .5v |
… | |
… | |
131 | .\} |
131 | .\} |
132 | .rm #[ #] #H #V #F C |
132 | .rm #[ #] #H #V #F C |
133 | .\" ======================================================================== |
133 | .\" ======================================================================== |
134 | .\" |
134 | .\" |
135 | .IX Title "LIBEV 3" |
135 | .IX Title "LIBEV 3" |
136 | .TH LIBEV 3 "2015-05-01" "libev-4.19" "libev - high performance full featured event loop" |
136 | .TH LIBEV 3 "2015-12-20" "libev-4.20" "libev - high performance full featured event loop" |
137 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
137 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
138 | .\" way too many mistakes in technical documents. |
138 | .\" way too many mistakes in technical documents. |
139 | .if n .ad l |
139 | .if n .ad l |
140 | .nh |
140 | .nh |
141 | .SH "NAME" |
141 | .SH "NAME" |
… | |
… | |
541 | GNU/Linux system for example, \f(CW\*(C`getpid\*(C'\fR is actually a simple 5\-insn sequence |
541 | GNU/Linux system for example, \f(CW\*(C`getpid\*(C'\fR is actually a simple 5\-insn sequence |
542 | without a system call and thus \fIvery\fR fast, but my GNU/Linux system also has |
542 | without a system call and thus \fIvery\fR fast, but my GNU/Linux system also has |
543 | \&\f(CW\*(C`pthread_atfork\*(C'\fR which is even faster). |
543 | \&\f(CW\*(C`pthread_atfork\*(C'\fR which is even faster). |
544 | .Sp |
544 | .Sp |
545 | The big advantage of this flag is that you can forget about fork (and |
545 | The big advantage of this flag is that you can forget about fork (and |
546 | forget about forgetting to tell libev about forking) when you use this |
546 | forget about forgetting to tell libev about forking, although you still |
547 | flag. |
547 | have to ignore \f(CW\*(C`SIGPIPE\*(C'\fR) when you use this flag. |
548 | .Sp |
548 | .Sp |
549 | This flag setting cannot be overridden or specified in the \f(CW\*(C`LIBEV_FLAGS\*(C'\fR |
549 | This flag setting cannot be overridden or specified in the \f(CW\*(C`LIBEV_FLAGS\*(C'\fR |
550 | environment variable. |
550 | environment variable. |
551 | .ie n .IP """EVFLAG_NOINOTIFY""" 4 |
551 | .ie n .IP """EVFLAG_NOINOTIFY""" 4 |
552 | .el .IP "\f(CWEVFLAG_NOINOTIFY\fR" 4 |
552 | .el .IP "\f(CWEVFLAG_NOINOTIFY\fR" 4 |
… | |
… | |
816 | to reinitialise the kernel state for backends that have one. Despite |
816 | to reinitialise the kernel state for backends that have one. Despite |
817 | the name, you can call it anytime you are allowed to start or stop |
817 | the name, you can call it anytime you are allowed to start or stop |
818 | watchers (except inside an \f(CW\*(C`ev_prepare\*(C'\fR callback), but it makes most |
818 | watchers (except inside an \f(CW\*(C`ev_prepare\*(C'\fR callback), but it makes most |
819 | sense after forking, in the child process. You \fImust\fR call it (or use |
819 | sense after forking, in the child process. You \fImust\fR call it (or use |
820 | \&\f(CW\*(C`EVFLAG_FORKCHECK\*(C'\fR) in the child before resuming or calling \f(CW\*(C`ev_run\*(C'\fR. |
820 | \&\f(CW\*(C`EVFLAG_FORKCHECK\*(C'\fR) in the child before resuming or calling \f(CW\*(C`ev_run\*(C'\fR. |
|
|
821 | .Sp |
|
|
822 | In addition, if you want to reuse a loop (via this function or |
|
|
823 | \&\f(CW\*(C`EVFLAG_FORKCHECK\*(C'\fR), you \fIalso\fR have to ignore \f(CW\*(C`SIGPIPE\*(C'\fR. |
821 | .Sp |
824 | .Sp |
822 | Again, you \fIhave\fR to call it on \fIany\fR loop that you want to re-use after |
825 | Again, you \fIhave\fR to call it on \fIany\fR loop that you want to re-use after |
823 | a fork, \fIeven if you do not plan to use the loop in the parent\fR. This is |
826 | a fork, \fIeven if you do not plan to use the loop in the parent\fR. This is |
824 | because some kernel interfaces *cough* \fIkqueue\fR *cough* do funny things |
827 | because some kernel interfaces *cough* \fIkqueue\fR *cough* do funny things |
825 | during fork. |
828 | during fork. |