ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.546 by root, Thu May 6 22:57:49 2010 UTC vs.
Revision 1.547 by root, Sun May 9 22:51:13 2010 UTC

592Coro::Storable. May, of course, block. Note that the executed sub may 592Coro::Storable. May, of course, block. Note that the executed sub may
593never block itself or use any form of event handling. 593never block itself or use any form of event handling.
594 594
595=cut 595=cut
596 596
597sub post_fork {
598 reset_signals;
599}
600
597sub fork_call(&@) { 601sub fork_call(&@) {
598 my ($cb, @args) = @_; 602 my ($cb, @args) = @_;
599 603
600 # we seemingly have to make a local copy of the whole thing, 604 # we seemingly have to make a local copy of the whole thing,
601 # otherwise perl prematurely frees the stuff :/ 605 # otherwise perl prematurely frees the stuff :/
602 # TODO: investigate and fix (likely this will be rather laborious) 606 # TODO: investigate and fix (likely this will be rather laborious)
603 607
604 my @res = Coro::Util::fork_eval { 608 my @res = Coro::Util::fork_eval {
605 reset_signals; 609 cf::post_fork;
606 &$cb 610 &$cb
607 }, @args; 611 }, @args;
608 612
609 wantarray ? @res : $res[-1] 613 wantarray ? @res : $res[-1]
610} 614}
1648 $pl->{deny_save} = 1; 1652 $pl->{deny_save} = 1;
1649 $pl->password ("*"); # this should lock out the player until we have nuked the dir 1653 $pl->password ("*"); # this should lock out the player until we have nuked the dir
1650 1654
1651 $pl->invoke (cf::EVENT_PLAYER_LOGOUT, 1) if $pl->active; 1655 $pl->invoke (cf::EVENT_PLAYER_LOGOUT, 1) if $pl->active;
1652 $pl->deactivate; 1656 $pl->deactivate;
1657
1653 my $killer = cf::arch::get "killer_quit"; $pl->killer ($killer); $killer->destroy; 1658 my $killer = cf::arch::get "killer_quit"; $pl->killer ($killer); $killer->destroy;
1659 ext::highscore::check ($pl->ob);
1660
1654 $pl->invoke (cf::EVENT_PLAYER_QUIT); 1661 $pl->invoke (cf::EVENT_PLAYER_QUIT);
1655 $pl->ns->destroy if $pl->ns; 1662 $pl->ns->destroy if $pl->ns;
1656 1663
1657 my $path = playerdir $pl; 1664 my $path = playerdir $pl;
1658 my $temp = "$path~$cf::RUNTIME~deleting~"; 1665 my $temp = "$path~$cf::RUNTIME~deleting~";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines