Hello I have written an AnyEvent based supervisor to run other Perl scripts under it or code references. I am having issues with the tcp_server when running it on an unix socket because the socket goes away when the listener gets destroyed in some particular circumstances when the child exists. For example when the command to be executed is missing or when running a code reference and sening the child running the code ref a TERM signal. I suspect this is due to forking from the main AnyEvent program. However, when using a TCP socket, it's still available even after the child exists. I don't know if this is a bug on my part of a feature of AnyEvent removing the socket but I kindly request your help to find a reasonable explination and a solution to this.
The latest development code is available here: http://chiselapp.com/user/ggl/repository/App-Sv Of particular interest is checkin 899504d3f0 because it allows execution of coderefs and the bug is easy to reproduce. No need to install fossil: you can download it as tarball if you follow the checkin hash link. Below is a trace: 2013-11-02T12:54:57+0200 debug 3854 Sent signal TERM to pid 3855 2013-11-02 12:54:57.880697 +0200 trace AnyEvent::Debug: leave App::Sv:316(_client_conn)>io>AnyEvent::Handle:555 2013-11-02 12:54:57.880981 +0200 trace AnyEvent::Debug: dstry App::Sv:85(run)>signal>App::Sv:78 2013-11-02 12:54:57.881313 +0200 trace AnyEvent::Debug: dstry App::Sv:81(run)>signal>App::Sv:78 2013-11-02 12:54:57.881407 +0200 trace AnyEvent::Debug: dstry App::Sv:78(run)>signal>App::Sv:78 2013-11-02 12:54:57.882033 +0200 trace AnyEvent::Debug: dstry App::Sv:297(_listener)>io>AnyEvent::Socket:489 2013-11-02 12:54:57.884407 +0200 trace AnyEvent::Debug: enter App::Sv:316(_client_conn)>io>AnyEvent::Handle:555 2013-11-02 12:54:57.884800 +0200 trace AnyEvent::Debug: dstry App::Sv:316(_client_conn)>timer>AnyEvent::Handle:555 2013-11-02T12:54:57+0200 debug 3854 Connection closed
_______________________________________________ anyevent mailing list [email protected] http://lists.schmorp.de/mailman/listinfo/anyevent
