… | |
… | |
35 | while (EV::TIMEOUT & Coro::EV::timed_io_once \$fh, EV::READ, 1) { Coro::Debug::command "ps" } & |
35 | while (EV::TIMEOUT & Coro::EV::timed_io_once \$fh, EV::READ, 1) { Coro::Debug::command "ps" } & |
36 | ({cf::mallinfo}) |
36 | ({cf::mallinfo}) |
37 | EOF |
37 | EOF |
38 | print $fh "\n> "; |
38 | print $fh "\n> "; |
39 | |
39 | |
40 | my $iow; $iow = EV::io $fh, EV::READ, sub { |
40 | my $iow; $iow = AE::io $fh, 0, sub { |
41 | if (defined (my $cmd = <$fh>)) { |
41 | if (defined (my $cmd = <$fh>)) { |
42 | $cmd =~ s/\s+$//; |
42 | $cmd =~ s/\s+$//; |
43 | |
43 | |
44 | if ($cmd =~ /^\s*exit\b/i) { |
44 | if ($cmd =~ /^\s*exit\b/i) { |
45 | print $fh "will not exit() server.\n"; |
45 | print $fh "will not exit() server.\n"; |
… | |
… | |
90 | our $LISTENER; |
90 | our $LISTENER; |
91 | |
91 | |
92 | # now a shell listening on a tcp-port - let the firewall decide access rights |
92 | # now a shell listening on a tcp-port - let the firewall decide access rights |
93 | if ($cf::CFG{perl_shell}) { |
93 | if ($cf::CFG{perl_shell}) { |
94 | if (my $listen = new IO::Socket::INET LocalAddr => $cf::CFG{perl_shell}, Listen => 1, ReuseAddr => 1, Blocking => 0) { |
94 | if (my $listen = new IO::Socket::INET LocalAddr => $cf::CFG{perl_shell}, Listen => 1, ReuseAddr => 1, Blocking => 0) { |
95 | $LISTENER = EV::io $listen, EV::READ, sub { tcp_serve $listen->accept }; |
95 | $LISTENER = AE::io $listen, 0, sub { tcp_serve $listen->accept }; |
96 | } |
96 | } |
97 | } |
97 | } |
98 | |
98 | |
99 | |
99 | |