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.473 by root, Fri Jun 26 16:32:10 2009 UTC vs.
Revision 1.474 by root, Thu Jul 16 21:42:56 2009 UTC

72 72
73# make sure c-lzf reinitialises itself 73# make sure c-lzf reinitialises itself
74Compress::LZF::set_serializer "Storable", "Storable::net_mstore", "Storable::mretrieve"; 74Compress::LZF::set_serializer "Storable", "Storable::net_mstore", "Storable::mretrieve";
75Compress::LZF::sfreeze_cr { }; # prime Compress::LZF so it does not use require later 75Compress::LZF::sfreeze_cr { }; # prime Compress::LZF so it does not use require later
76 76
77# strictly for debugging
78$SIG{QUIT} = sub { Carp::cluck "SIGQUIT" };
79
77sub WF_AUTOCANCEL () { 1 } # automatically cancel this watcher on reload 80sub WF_AUTOCANCEL () { 1 } # automatically cancel this watcher on reload
78 81
79our %COMMAND = (); 82our %COMMAND = ();
80our %COMMAND_TIME = (); 83our %COMMAND_TIME = ();
81 84
134our $JITTER; # average jitter 137our $JITTER; # average jitter
135our $TICK_START; # for load detecting purposes 138our $TICK_START; # for load detecting purposes
136 139
137our @POST_INIT; 140our @POST_INIT;
138 141
139our $REATTACH_ON_RELOAD; # ste to true to force object reattach on reload (slow) 142our $REATTACH_ON_RELOAD; # set to true to force object reattach on reload (slow)
143our $REALLY_UNLOOP; # never set to true, please :)
140 144
141binmode STDOUT; 145binmode STDOUT;
142binmode STDERR; 146binmode STDERR;
143 147
144# read virtual server time, if available 148# read virtual server time, if available
3400 3404
3401 seek $fh, 0, 0; 3405 seek $fh, 0, 0;
3402 print $fh $$; 3406 print $fh $$;
3403} 3407}
3404 3408
3409sub main_loop {
3410 warn "EV::loop starting\n";
3411 if (1) {
3412 EV::loop;
3413 }
3414 warn "EV::loop returned\n";
3415 goto &main_loop unless $REALLY_UNLOOP;
3416}
3417
3405sub main { 3418sub main {
3406 cf::init_globals; # initialise logging 3419 cf::init_globals; # initialise logging
3407 3420
3408 LOG llevInfo, "Welcome to Deliantra, v" . VERSION; 3421 LOG llevInfo, "Welcome to Deliantra, v" . VERSION;
3409 LOG llevInfo, "Copyright (C) 2005-2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team."; 3422 LOG llevInfo, "Copyright (C) 2005-2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team.";
3452 POSIX::close delete $ENV{LOCKUTIL_LOCK_FD} if exists $ENV{LOCKUTIL_LOCK_FD}; 3465 POSIX::close delete $ENV{LOCKUTIL_LOCK_FD} if exists $ENV{LOCKUTIL_LOCK_FD};
3453 3466
3454 (pop @POST_INIT)->(0) while @POST_INIT; 3467 (pop @POST_INIT)->(0) while @POST_INIT;
3455 }; 3468 };
3456 3469
3457 EV::loop; 3470 main_loop;
3458} 3471}
3459 3472
3460############################################################################# 3473#############################################################################
3461# initialisation and cleanup 3474# initialisation and cleanup
3462 3475

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines