diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-02-16 22:54:07 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-02-16 22:54:07 +0200 |
commit | fb5ae9a7a5a36211af989ec7cac986880d49e538 (patch) | |
tree | 4ce0620356fff048c0da1283f0a25ffc1c538013 /src/porting.cpp | |
parent | 741776313a0be27de722bc9894a9cc987db433b0 (diff) | |
download | minetest-fb5ae9a7a5a36211af989ec7cac986880d49e538.tar.gz minetest-fb5ae9a7a5a36211af989ec7cac986880d49e538.tar.bz2 minetest-fb5ae9a7a5a36211af989ec7cac986880d49e538.zip |
Debug stacks will now be printed on Ctrl-C. Also client properly quits on Ctrl-C.
Diffstat (limited to 'src/porting.cpp')
-rw-r--r-- | src/porting.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/porting.cpp b/src/porting.cpp index 50605587d..97b028236 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "porting.h" #include "config.h" +#include "debug.h" namespace porting { @@ -47,8 +48,13 @@ void sigint_handler(int sig) { if(g_killed == false) { - dstream<<DTIME<<"sigint_handler(): " + dstream<<DTIME<<"INFO: sigint_handler(): " <<"Ctrl-C pressed, shutting down."<<std::endl; + + dstream<<DTIME<<"INFO: siging_handler(): " + <<"Printing debug stacks"<<std::endl; + debug_stacks_print(); + g_killed = true; } else |