ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/shell.pl
(Generate patch)

Comparing Coro/myhttpd/shell.pl (file contents):
Revision 1.2 by root, Fri Aug 10 04:16:41 2001 UTC vs.
Revision 1.4 by root, Sat Aug 11 00:37:32 2001 UTC

12 s/\015?\012$//; 12 s/\015?\012$//;
13 chomp; 13 chomp;
14 if (/^q/) { 14 if (/^q/) {
15 Event::unloop; 15 Event::unloop;
16 } elsif (/^i/) { 16 } elsif (/^i/) {
17 my @conn; 17 my @data;
18 push @conn, values %$_ for values %conn::conn;
19 for (values %conn::conn) { 18 for (values %conn::conn) {
20 for (values %$_) { 19 for (values %$_) {
21 next unless $_; 20 next unless $_;
22 print $fh "$_: $_->{remote_addr} $_->{uri}\n"; 21 push @data, "$_: $_->{remote_addr} $_->{uri}\n";
23 } 22 }
24 } 23 }
24 print $fh sort @data;
25 print $fh scalar@data, " connections\n";#d#
25 } elsif (/^r/) { 26 } elsif (/^r/) {
26 $::RESTART = 1; 27 $::RESTART = 1;
27 unloop; 28 unloop;
28 print $fh "bye bye.\n"; 29 print $fh "bye bye.\n";
29 last; 30 last;
43 or die "unable to bind cmdshell port: $!"; 44 or die "unable to bind cmdshell port: $!";
44 45
45 push @listen_sockets, $port; 46 push @listen_sockets, $port;
46 47
47 async { 48 async {
48 async \&shell, $port->accept; 49 async \&shell, $port->accept
50 while 1;
49 }; 51 };
50} 52}
51 53
52# bind to stdin (debug) 54# bind to stdin (debug)
53if (1) { 55if (1) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines