Re: question on ev_loop_fork

2016-02-24 Thread Marc Lehmann
On Thu, Feb 25, 2016 at 09:50:20AM +0800, adream wrote: > It seems that ev_loop_fork didn't work as expected. > Am I misunderstand the document? Possibly - how _are_ you understanding it? :) > So, can any guys shows me an example which would have different > behavior if I call the ev_loop_fork o

Re: question on ev_loop_fork

2016-02-24 Thread Marc Lehmann
On Wed, Feb 24, 2016 at 09:22:15PM +0800, adream wrote: > hi > I thought, if I didn't call the ev_loop_fork in the child, then the > watcher in child wouldn't be triggered. ev_loop_fork (or EVFLAG_FORKCHECK) are required for the event loop to survive a fork. they don't do anything else. not

Re: question on ev_loop_fork

2016-02-24 Thread adream
It seems that ev_loop_fork didn't work as expected. Am I misunderstand the document? So, can any guys shows me an example which would have different behavior if I call the ev_loop_fork or not? Thanks Looking forward for any useful advice. 2016-02-24 21:22 GMT+08:00, adream : > hi > I thought,

question on ev_loop_fork

2016-02-24 Thread adream
hi I thought, if I didn't call the ev_loop_fork in the child, then the watcher in child wouldn't be triggered. This is my code, I build the ev_loop with EVBACKEND_EPOLL and EVFLAG_NOENV flags, so there is no EVFLAG_FORKCHECK flag, then I comment the ev_loop_fork call in the child. if everyt