--- deliantra/server/ext/dm-support.ext 2007/09/13 08:35:24 1.9 +++ deliantra/server/ext/dm-support.ext 2007/09/20 12:30:28 1.11 @@ -1,5 +1,6 @@ #! perl +use Coro::Debug; use IO::Socket; use Storable qw/nfreeze thaw/; @@ -42,6 +43,8 @@ if ($cmd =~ /^\s*exit\b/i) { print "will not exit() server.\n"; + } elsif ($cmd =~ s/^coro\s+// or $cmd =~ /^(?:ps|bt\s)/) { + Coro::Debug::command $cmd; } else { my $sub = sub { package cf; @@ -64,7 +67,10 @@ }; if ($cmd =~ s/\s*&$//) { - Coro::async { $sub->() }; + cf::async { + $Coro::current->desc ($cmd); + $sub->() + }; } else { $sub->(); } @@ -83,3 +89,5 @@ Event->io (fd => $listen, poll => 'r', data => cf::WF_AUTOCANCEL, cb => sub { tcp_serve $listen->accept }); } } + +