embed kqueu loop after fork (on freebsd)
Vladimir Timofeev
vovkasm at gmail.com
Fri Feb 5 12:54:59 CET 2010
Hi
I have a trouble to embed kqueue loop after doing loop_fork call in
child process. Seems that after loop_fork ev don't listen embedded
watcher.
Test program attached.
If it use only default loop, output this (also i send HUP by hand to
test sighandler):
master pid 17414
child pid 17415
master send hello (17414)
child HELLO FROM MASTER
child send hello (17415)
master HELLO FROM CHILD
HUP DECLARED BEFORE FORK (17414)
HUP DECLARED BEFORE FORK (17415)
master got SIGINT (17414)
child got SIGINT (17415)
child END
master END
If it used with embedded kqueue loop, it's output:
master pid 17686
child pid 17687
master send hello (17686)
child send hello (17687)
master HELLO FROM CHILD
HUP DECLARED BEFORE FORK (17686)
HUP DECLARED BEFORE FORK (17687)
master got SIGINT (17686)
child got SIGINT (17687)
child END
master END
I.e. child hasn't detect message from master.
Environment: freebsd-7.1, perl-5.10.1 without threads, EV-3.9
--
-- vovkasm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pl
Type: application/octet-stream
Size: 2051 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20100205/d90f1677/attachment.obj>
More information about the libev
mailing list