… | |
… | |
234 | This function reinitialises the kernel state for backends that have |
234 | This function reinitialises the kernel state for backends that have |
235 | one. Despite the name, you can call it anytime, but it makes most sense |
235 | one. Despite the name, you can call it anytime, but it makes most sense |
236 | after forking, in either the parent or child process (or both, but that |
236 | after forking, in either the parent or child process (or both, but that |
237 | again makes little sense). |
237 | again makes little sense). |
238 | |
238 | |
239 | You I<must> call this function after forking if and only if you want to |
239 | You I<must> call this function in the child process after forking if and |
240 | use the event library in both processes. If you just fork+exec, you don't |
240 | only if you want to use the event library in both processes. If you just |
241 | have to call it. |
241 | fork+exec, you don't have to call it. |
242 | |
242 | |
243 | The function itself is quite fast and it's usually not a problem to call |
243 | The function itself is quite fast and it's usually not a problem to call |
244 | it just in case after a fork. To make this easy, the function will fit in |
244 | it just in case after a fork. To make this easy, the function will fit in |
245 | quite nicely into a call to C<pthread_atfork>: |
245 | quite nicely into a call to C<pthread_atfork>: |
246 | |
246 | |