Changeset 954
- Timestamp:
- 06/17/07 23:09:40 (1 year ago)
- Files:
-
- 1.8.3/branches/devel/game/README (modified) (6 diffs)
- 1.8.3/branches/devel/game/restart (modified) (3 diffs)
- 1.8.3/branches/devel/hdrs/csrimalloc.h (modified) (2 diffs)
- 1.8.3/branches/devel/src/bsd.c (modified) (8 diffs)
- 1.8.3/branches/devel/src/csrimalloc.c (modified) (4 diffs)
- 1.8.3/branches/devel/src/game.c (modified) (1 diff)
- 1.8.3/branches/devel/src/wiz.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/branches/devel/game/README
r515 r954 4 4 PennMUSH as described in the main PennMUSH README file. 5 5 6 The next step is to create your configuration file. In the game directory7 is a file called "mush.cnf". If you don't have mush.cnf, but you have 8 mushcnf.dst, you can copy mushcnf.dst to mush.cnf. This file is a list 9 of all runtime configuration options with their default settting. Change 10 them as you see fit. IMPORTANT: do not _delete_ any parameters. They11 all need to be there.6 The next step is to create your configuration file. In the game 7 directory is a file called "mush.cnf". If you don't have mush.cnf, but 8 you have mushcnf.dst, you can copy mushcnf.dst to mush.cnf. This file 9 is a list of all runtime configuration options with their default 10 settting. Change them as you see fit. IMPORTANT: do not _delete_ any 11 parameters. They all need to be there. 12 12 13 13 WIN32 WITH MSVC++: … … 21 21 containing mush.cnf. Read about the optional settings in that file. 22 22 The restart script is written for sh, and assumes a fairly standard 23 Berkeley UNIX setup. If you're on a HP-UX or SysV machine, for example,24 you may need to change the restart script a bit (the ps options,25 for example). Then run it.23 Berkeley UNIX setup. If you're on a HP-UX or SysV machine, for 24 example, you may need to change the restart script a bit. Then run 25 it, with 'sh restart' or './restart'. 26 26 27 You should now be ready to startthe game. This distribution can27 You should now be able to log into the game. This distribution can 28 28 general a minimal database - a God character, starting room, and 29 29 master room. The server will generate this database if it doesn't … … 32 32 If you're starting with the minimal database, the god character "One" 33 33 has no password, so you can log in without one. Of course, you should 34 immediately set one (via @newpasswd). options.h has the Master Room as 35 #2 by default; in the minimal database, this room is created for you. 34 immediately set one (via @newpasswd). options.h has the Master Room 35 as #2 by default; in the minimal database, this room is created for 36 you. 36 37 37 Now you should be set -- all you have to do now is customize the 38 .txtfiles in the game directory.38 Now you should be set -- all you have to do now is customize the .txt 39 files in the game directory. 39 40 40 41 The logfiles in the "log" directory generally contain useful 41 information. You will probably want to read your error logfile (defined42 in mush.cnf) every time, since errors and other important messages get43 printed to that logfile.42 information. You will probably want to read your error logfile 43 (defined in mush.cnf) every time, since errors and other important 44 messages get printed to that logfile. 44 45 45 After your first startup, it's a good idea to make some small 46 change to the database (e.g., @create an object) and then 47 do an @shutdown. Restart the game again and ensure that your 48 object is still present - this verifies that the server is 49 successfully dumping. 46 After your first startup, it's a good idea to make some small change 47 to the database (e.g., @create an object) and then do an 48 @shutdown. Restart the game again and ensure that your object is still 49 present - this verifies that the server is successfully dumping. 50 50 51 51 ============================================================================ … … 75 75 76 76 To attempt to fix the problem, do a @dbck to take care of any possible 77 minor weirdness in the database, then try doing a "@dump/paranoid", and 78 reading the checkpoint logfile (default is log/checkpt.log). This is 79 slow, but it will write out an uncorrupted database, and tell you what 80 it fixed. Back up that database and indb.Z, then figure out what you're 81 going to do next: you can take the game down with a kill -9, or attempt 82 to manually fix the problem by either @destroying the offending object, 83 or attempting to reset the attributes on the object that are causing a 84 problem. If "@dump/paranoid" dies, you are more or less out of luck. 77 minor weirdness in the database, then try doing a "@dump/paranoid", 78 and reading the checkpoint logfile (default is log/checkpt.log). This 79 is slow, but it will write out an uncorrupted database, and tell you 80 what it fixed. Back up that database and indb.Z, then figure out what 81 you're going to do next: you can take the game down with a kill -9, or 82 attempt to manually fix the problem by either @destroying the 83 offending object, or attempting to reset the attributes on the object 84 that are causing a problem. If "@dump/paranoid" dies, you are more or 85 less out of luck. 85 86 86 87 The game may crash from time to time. It will generate a core file, … … 91 92 your source code, and type 92 93 <name of debugger> netmud ../game/core 93 If you don't call your executable "netmud", substitute in whatever 94 youdo call it.94 If you don't call your executable "netmud", substitute in whatever you 95 do call it. 95 96 96 97 You are looking for variables set to bizarre values - attempts to … … 109 110 name>" to see the value of a variable at the time the game crashed. 110 111 The "gdb" debugger is similar to "dbx"; with that, you can abbreviate 111 "print" as "p". 112 "print" as "p". It is the reccomended debugger to use; when gdb is 113 present on your system and you're using gcc as the compiler, gcc is 114 told to use a gdb-specific debugging format. 112 115 113 Javelin appreciates news of any bugs found, and any patches that have 114 been written to deal with them. He is also interested in any extensions 115 that people make to the code, and requests that ones that are of more 116 than just local interest be sent to him for inclusion in the next 117 release of this code. 116 If you want to start PennMUSH running under a debugger, instead of 117 attaching to an already-running process, it'll need two arguments: 118 --no-session, and the name of your config file if it is different than 119 mush.cnf. Without --no-session, the server will immediately fork off a 120 detatched child process, and the debugger will tell you that the 121 process exited normally.. 118 122 119 One important thing to remember is, if the MUSH refuses to start, there 120 is probably a good reason. Check the MUSH log, and the core file, if 121 there is one. Make sure to back up your database before attempting to 122 restart -- remember that every time it restarts, it overwrites 123 indb.Z.old. If you restart three times and somehow manage to trash your 124 database each time (for example, a full process table zero'ing out your 125 files), you won't have a backup to restart from, unless you've backed 126 up your database before trying! 123 The PennMUSH developers appreciate news of any bugs found, and any 124 patches that have been written to deal with them. We are also 125 interested in any extensions that people make to the code, and 126 requests that ones that are of more than just local interest be sent 127 to us for inclusion in the next release of this code. See 128 http://dev.pennmush.org. 129 130 One important thing to remember is, if the MUSH refuses to start, 131 there is probably a good reason. Check the MUSH log, and the core 132 file, if there is one. Make sure to back up your database before 133 attempting to restart -- remember that every time it restarts, it 134 overwrites indb.Z.old. If you restart three times and somehow manage 135 to trash your database each time (for example, a full process table 136 zero'ing out your files), you won't have a backup to restart from, 137 unless you've backed up your database before trying! 127 138 128 139 You can also find helpful tips in Javelin's Guide for Gods, 129 140 which is available on the WWW as 130 http:// pennmush.org/~alansz/guide.html131 and by ftp from pennmush.org as132 / pub/DuneMUSH/Guide/guide-single.txt141 http://javelin.pennmush.org/~alansz/guide.html 142 and by ftp from ftp.pennmush.org as 143 /PennMUSH/Guide/guide-single.txt 133 144 1.8.3/branches/devel/game/restart
r694 r954 8 8 9 9 # OPTIONAL things that you may want to tweak. 10 11 # Name of file to write the game's process id to. Used by restart to 12 # check for an already running game. 13 PIDFILE=netmush.pid 10 14 11 15 # Uncomment the line below to attempt to allow crashes to produce … … 86 90 # Prevent double-starting things. You may need to provide a pathname for 87 91 # some of the commands. System V flavors need "ps -f" instead of "ps uwx". 88 mush=`ps uwwx | grep " $GAMEDIR/$CONF_FILE" | grep -v grep | wc -l`89 92 93 # Old style, look for a program using the config file. 94 #mush=`ps uwwx | grep " $GAMEDIR/$CONF_FILE" | grep -v grep | wc -l` 95 # if [ "$mush" -gt 0 ]; then 90 96 91 if [ "$mush" -gt 0 ]; then 97 # New style, look for a pid file. 98 if [ -f $PIDFILE ]; then 99 foo=`kill -0 \`cat $PIDFILE\` 2>/dev/null` 100 mush=$? 101 else 102 mush=1; 103 fi 104 105 if [ "$mush" -eq 0 ]; then 92 106 echo Mush already active or some other process is using $GAMEDIR/$CONF_FILE. 93 107 exit 0 … … 141 155 export DATEMSK 142 156 143 LC_ALL=$LANG LANG=$LANG ./netmush $ GAMEDIR/$CONF_FILE &157 LC_ALL=$LANG LANG=$LANG ./netmush $@ $GAMEDIR/$CONF_FILE & 1.8.3/branches/devel/hdrs/csrimalloc.h
r905 r954 22 22 /* Tracing malloc definitions - helps find leaks */ 23 23 24 extern univptr_t trace__malloc 25 _((size_t nbytes, const char *fname, int linenum)); 26 extern univptr_t trace__calloc 27 _((size_t nelem, size_t elsize, const char *fname, int linenum)); 28 extern univptr_t trace__realloc 29 _((univptr_t cp, size_t nbytes, const char *fname, int linenum)); 30 extern univptr_t trace__valloc _((size_t size, const char *fname, int linenum)); 31 extern univptr_t trace__memalign 32 _((size_t alignment, size_t size, const char *fname, int linenum)); 33 extern univptr_t trace__emalloc 34 _((size_t nbytes, const char *fname, int linenum)); 35 extern univptr_t trace__ecalloc 36 _((size_t nelem, size_t sz, const char *fname, int linenum)); 37 extern univptr_t trace__erealloc 38 _((univptr_t ptr, size_t nbytes, const char *fname, int linenum)); 39 extern char *trace__strdup _((const char *s, const char *fname, int linenum)); 40 extern char *trace__strsave _((const char *s, const char *fname, int linenum)); 41 extern void trace__free _((univptr_t cp, const char *fname, int linenum)); 42 extern void trace__cfree _((univptr_t cp, const char *fname, int linenum)); 24 univptr_t trace__malloc(size_t nbytes, const char *fname, int linenum); 25 univptr_t trace__calloc 26 (size_t nelem, size_t elsize, const char *fname, int linenum); 27 univptr_t trace__realloc 28 (univptr_t cp, size_t nbytes, const char *fname, int linenum); 29 univptr_t trace__valloc(size_t size, const char *fname, int linenum); 30 univptr_t trace__memalign 31 (size_t alignment, size_t size, const char *fname, int linenum); 32 univptr_t trace__emalloc(size_t nbytes, const char *fname, int linenum); 33 univptr_t trace__ecalloc 34 (size_t nelem, size_t sz, const char *fname, int linenum); 35 univptr_t trace__erealloc 36 (univptr_t ptr, size_t nbytes, const char *fname, int linenum); 37 char *trace__strdup(const char *s, const char *fname, int linenum); 38 char *trace__strsave(const char *s, const char *fname, int linenum); 39 void trace__free(univptr_t cp, const char *fname, int linenum); 40 void trace__cfree(univptr_t cp, const char *fname, int linenum); 43 41 44 42 #define malloc(x) trace__malloc((x), __FILE__, __LINE__) … … 58 56 #else /* CSRI_TRACE */ 59 57 60 extern univptr_t malloc _((size_t nbytes));61 extern univptr_t calloc _((size_t nelem, size_t elsize));62 extern univptr_t realloc _((univptr_t cp, size_t nbytes));63 extern univptr_t valloc _((size_t size));64 extern univptr_t memalign _((size_t alignment, size_t size));65 extern univptr_t emalloc _((size_t nbytes));66 extern univptr_t ecalloc _((size_t nelem, size_t sz));67 extern univptr_t erealloc _((univptr_t ptr, size_t nbytes));68 extern char *strdup _((const char *s));69 extern char *strsave _((const char *s));70 extern Free_t free _((univptr_t cp));71 extern Free_t cfree _((univptr_t cp));58 univptr_t malloc(size_t nbytes); 59 univptr_t calloc(size_t nelem, size_t elsize); 60 univptr_t realloc(univptr_t cp, size_t nbytes); 61 univptr_t valloc(size_t size); 62 univptr_t memalign(size_t alignment, size_t size); 63 univptr_t emalloc(size_t nbytes); 64 univptr_t ecalloc(size_t nelem, size_t sz); 65 univptr_t erealloc(univptr_t ptr, size_t nbytes); 66 char *strdup(const char *s); 67 char *strsave(const char *s); 68 void free(univptr_t cp); 69 void cfree(univptr_t cp); 72 70 73 71 #endif /* CSRI_TRACE */ 74 72 75 extern void mal_debug _((int level));76 extern void mal_dumpleaktrace _((FILE * fp));77 extern void mal_heapdump _((FILE * fp));78 extern void mal_leaktrace _((int value));79 extern void mal_sbrkset _((int n));80 extern void mal_slopset _((int n));81 extern void mal_statsdump _((FILE * fp));82 extern void mal_setstatsfile _((FILE * fp));83 extern void mal_trace _((int value));84 extern int mal_verify _((int fullcheck));85 extern void mal_mmap _((char *fname));73 void mal_debug(int level); 74 void mal_dumpleaktrace(FILE * fp); 75 void mal_heapdump(FILE * fp); 76 void mal_leaktrace(int value); 77 void mal_sbrkset(int n); 78 void mal_slopset(int n); 79 void mal_statsdump(FILE * fp); 80 void mal_setstatsfile(FILE * fp); 81 void mal_trace(int value); 82 int mal_verify(int fullcheck); 83 void mal_mmap(char *fname); 86 84 87 85 1.8.3/branches/devel/src/bsd.c
r952 r954 378 378 void load_reboot_db(void); 379 379 380 static int in_suid_root_mode = 0; 380 static bool in_suid_root_mode = 0; 381 static char *pidfile = NULL; 382 static char **saved_argv = NULL; 381 383 382 384 #ifndef BOOLEXP_DEBUGGING … … 397 399 #endif /* WIN32SERVICES */ 398 400 { 399 #ifdef AUTORESTART400 FILE *id;401 #endif402 401 FILE *newerr; 402 int logfile_pos = -1; 403 403 bool detach_session = 1; 404 int logfile_pos;405 404 406 405 /* disallow running as root on unix. … … 440 439 if (strcmp(argv[n], "--no-session") == 0) 441 440 detach_session = 0; 442 else 443 fprintf(stderr, "Unknown option \"%s\"\n", argv[n]); 441 else if (strncmp(argv[n], "--pid-file", 10) == 0) { 442 char *eq; 443 if ((eq = strchr(argv[n], '='))) 444 pidfile = eq + 1; 445 else { 446 if (n + 1 >= argc) { 447 fprintf(stderr, "%s: --pid-file needs a filename.\n", argv[0]); 448 return EXIT_FAILURE; 449 } 450 pidfile = argv[n + 1]; 451 n++; 452 } 453 } else 454 fprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], argv[n]); 444 455 } else { 445 456 mush_strncpy(confname, argv[n], BUFFER_LEN); … … 470 481 } 471 482 #endif 483 484 #ifdef HAVE_GETPID 485 if (pidfile) { 486 FILE *f; 487 if (!(f = fopen(pidfile, "w"))) { 488 fprintf(stderr, "%s: Unable to write to pidfile '%s'\n", argv[0], 489 pidfile); 490 return EXIT_FAILURE; 491 } 492 fprintf(f, "%d\n", getpid()); 493 fclose(f); 494 } 495 #endif 496 497 saved_argv = argv; 472 498 473 499 #ifdef WIN32 … … 539 565 tables = pcre_maketables(); 540 566 541 /* this writes a file used by the restart script to check for active mush */542 #ifdef AUTORESTART543 id = fopen("runid", "w");544 fprintf(id, "%d", getpid());545 fclose(id);546 #endif547 548 567 init_game_config(confname); 549 568 … … 625 644 626 645 end_all_logs(); 646 647 if (pidfile) 648 remove(pidfile); 627 649 628 650 #ifdef CSRI … … 921 943 flag_broadcast(0, 0, T("GAME: Shutdown by external signal")); 922 944 do_rawlog(LT_ERR, T("SHUTDOWN by external signal")); 923 #ifdef AUTORESTART924 system("touch NORESTART");925 #endif926 945 shutdown_flag = 1; 927 946 } … … 4547 4566 flag_broadcast(0, 0, T("GAME: Reboot finished.")); 4548 4567 } 4568 4569 /** Reboot the game without disconnecting players. 4570 * \verbatim 4571 * This implements @shutdown/reboot, which performs a dump, saves 4572 * information about which player is associated with which socket, 4573 * and then re-execs the mush process without closing the sockets. 4574 * \endverbatim 4575 * \param player the enactor. 4576 * \param flag if 0, normal dump; if 1, paranoid dump. 4577 */ 4578 void 4579 do_reboot(dbref player, int flag) 4580 { 4581 if (player == NOTHING) { 4582 flag_broadcast(0, 0, 4583 T 4584 ("GAME: Reboot w/o disconnect from game account, please wait.")); 4585 } else { 4586 flag_broadcast(0, 0, 4587 T 4588 ("GAME: Reboot w/o disconnect by %s, please wait."), 4589 Name(Owner(player))); 4590 } 4591 if (flag) { 4592 globals.paranoid_dump = 1; 4593 globals.paranoid_checkpt = db_top / 5; 4594 if (globals.paranoid_checkpt < 1) 4595 globals.paranoid_checkpt = 1; 4596 } 4597 #ifdef HAS_OPENSSL 4598 close_ssl_connections(); 4599 #endif 4600 sql_shutdown(); 4601 shutdown_queues(); 4602 fork_and_dump(0); 4603 #ifndef PROFILING 4604 #ifndef WIN32 4605 /* Some broken libcs appear to retain the itimer across exec! 4606 * So we make sure that if we get a SIGPROF in our next incarnation, 4607 * we ignore it until our proper handler is set up. 4608 */ 4609 ignore_signal(SIGPROF); 4610 #endif 4611 #endif 4612 dump_reboot_db(); 4613 #ifdef INFO_SLAVE 4614 kill_info_slave(); 4615 #endif 4616 local_shutdown(); 4617 end_all_logs(); 4618 #ifndef WIN32 4619 { 4620 char *args[6]; 4621 4622 args[0] = saved_argv[0]; 4623 args[1] = "--no-session"; 4624 args[2] = "--pid-file"; 4625 args[3] = pidfile; 4626 args[4] = confname; 4627 args[5] = NULL; 4628 4629 execv(saved_argv[0], args); 4630 } 4631 #else 4632 execl("pennmush.exe", "pennmush.exe", "/run", NULL); 4633 #endif /* WIN32 */ 4634 exit(1); /* Shouldn't ever get here, but just in case... */ 4635 } 1.8.3/branches/devel/src/csrimalloc.c
r952 r954 38 38 #undef cfree(p) 39 39 #undef free(p) 40 extern char *strdup _((const char *));40 extern char *strdup(const char *); 41 41 #endif 42 42 … … 970 970 #ifdef CSRI_TRACE 971 971 /* Tracing malloc definitions - helps find leaks */ 972 univptr_t973 trace__malloc974 _((size_t nbytes, const char *fname, int linenum));975 univptr_t976 trace__calloc977 _((size_t nelem, size_t elsize, const char *fname, int linenum));978 univptr_t979 trace__realloc980 _((univptr_t cp, size_t nbytes, const char *fname, int linenum));981 univptr_t trace__valloc982 _((size_t size, const char *fname, int linenum));983 univptr_t984 trace__memalign985 _((size_t alignment, size_t size, const char *fname, int linenum));986 univptr_t trace__emalloc987 _((size_t nbytes, const char *fname, int linenum));988 972 univptr_t 989 trace__ecalloc _((size_t nelem, size_t sz, const char *fname, int linenum)); 990 univptr_t trace__erealloc 991 _((univptr_t ptr, size_t nbytes, const char *fname, int linenum)); 992 char *trace__strdup _((const char *s, const char *fname, int linenum)); 993 char *trace__strsave _((const char *s, const char *fname, int linenum)); 973 trace__malloc(size_t nbytes, const char *fname, int linenum); 974 univptr_t 975 trace__calloc(size_t nelem, size_t elsize, const char *fname, int linenum); 976 univptr_t 977 trace__realloc(univptr_t cp, size_t nbytes, const char *fname, int linenum); 978 univptr_t 979 trace__valloc(size_t size, const char *fname, int linenum); 980 univptr_t 981 trace__memalign 982 (size_t alignment, size_t size, const char *fname, int linenum); 983 univptr_t 984 trace__emalloc(size_t nbytes, const char *fname, int linenum); 985 univptr_t 986 trace__ecalloc(size_t nelem, size_t sz, const char *fname, int linenum); 987 univptr_t 988 trace__erealloc(univptr_t ptr, size_t nbytes, const char *fname, int linenum); 989 char *trace__strdup(const char *s, const char *fname, int linenum); 990 char *trace__strsave(const char *s, const char *fname, int linenum); 994 991 void 995 trace__free _((univptr_t cp, const char *fname, int linenum));992 trace__free(univptr_t cp, const char *fname, int linenum); 996 993 void 997 trace__cfree _((univptr_t cp, const char *fname, int linenum));994 trace__cfree(univptr_t cp, const char *fname, int linenum); 998 995 #else /* CSRI_TRACE */ 999 univptr_t 1000 malloc 1001 _((size_t nbytes)); 1002 univptr_t 1003 calloc 1004 _((size_t nelem, size_t elsize)); 1005 univptr_t 1006 realloc 1007 _((univptr_t cp, size_t nbytes)); 1008 univptr_t 1009 valloc 1010 _((size_t size)); 1011 univptr_t 1012 memalign 1013 _((size_t alignment, size_t size)); 1014 univptr_t 1015 emalloc 1016 _((size_t nbytes)); 1017 univptr_t 1018 ecalloc 1019 _((size_t nelem, size_t sz)); 1020 univptr_t 1021 erealloc 1022 _((univptr_t ptr, size_t nbytes)); 1023 Free_t free 1024 _((univptr_t cp)); 1025 Free_t cfree 1026 _((univptr_t cp)); 996 univptr_t 997 malloc(size_t nbytes); 998 univptr_t 999 calloc(size_t nelem, size_t elsize); 1000 univptr_t 1001 realloc(univptr_t cp, size_t nbytes); 1002 univptr_t 1003 valloc(size_t size); 1004 univptr_t 1005 memalign(size_t alignment, size_t size); 1006 univptr_t 1007 emalloc(size_t nbytes); 1008 univptr_t 1009 ecalloc(size_t nelem, size_t sz); 1010 univptr_t 1011 erealloc(univptr_t ptr, size_t nbytes); 1012 Free_t 1013 free(univptr_t cp); 1014 Free_t 1015 cfree(univptr_t cp); 1027 1016 #endif /* CSRI_TRACE */ 1028 1017 1029 1018 int 1030 __m_botch1031 _((const char *s1, const char *s2, univptr_t p,1032 int is_end_ptr, const char *filename, int linenumber) );1019 __m_botch 1020 (const char *s1, const char *s2, univptr_t p, 1021 int is_end_ptr, const char *filename, int linenumber); 1033 1022 void 1034 __m_prnode 1035 _((SPBLK * spblk)); 1023 __m_prnode(SPBLK * spblk); 1036 1024 void 1037 mal_contents 1038 _((FILE * fp)); 1025 mal_contents(FILE * fp); 1039 1026 #ifdef CSRI_DEBUG 1040 1027 void 1041 mal_debug 1042 _((int level)); 1028 mal_debug(int level); 1043 1029 int 1044 mal_verify 1045 _((int fullcheck)); 1030 mal_verify(int fullcheck); 1046 1031 #endif 1047 1032 void 1048 mal_dumpleaktrace 1049 _((FILE * fp)); 1033 mal_dumpleaktrace(FILE * fp); 1050 1034 void 1051 mal_heapdump 1052 _((FILE * fp)); 1035 mal_heapdump(FILE * fp); 1053 1036 void 1054 mal_leaktrace 1055 _((int value)); 1037 mal_leaktrace(int value); 1056 1038 void 1057 mal_sbrkset 1058 _((int n)); 1039 mal_sbrkset(int n); 1059 1040 void 1060 mal_slopset 1061 _((int n)); 1041 mal_slopset(int n); 1062 1042 #ifdef CSRI_PROFILESIZES 1063 1043 void 1064 mal_statsdump 1065 _((FILE * fp)); 1044 mal_statsdump(FILE * fp); 1066 1045 #endif 1067 1046 void 1068 mal_trace 1069 _((int value)); 1047 mal_trace(int value); 1070 1048 void 1071 mal_mmap 1072 _((char *fname)); 1049 mal_mmap(char *fname); 1073 1050 1074 1051 #ifdef CSRI_TRACE … … 1786 1763 } 1787 1764 1788 static void __m_count _((SPBLK * spblk));1765 static void __m_count(SPBLK * spblk); 1789 1766 1790 1767 static void … … 1908 1885 } 1909 1886 1910 static int grabhunk _((size_t));1887 static int grabhunk(size_t); 1911 1888 1912 1889 static int 1.8.3/branches/devel/src/game.c
r945 r954 287 287 do_log(LT_ERR, player, NOTHING, T("SHUTDOWN by %s(%s)\n"), 288 288 Name(player), unparse_dbref(player)); 289 290 /* This will create a file used to check if a restart should occur */291 #ifdef AUTORESTART292 system("touch NORESTART");293 #endif294 289 295 290 if (flag == SHUT_PANIC) { 1.8.3/branches/devel/src/wiz.c
r918 r954 1729 1729 } 1730 1730 1731 1732 /** Reboot the game without disconnecting players.1733 * \verbatim1734 * This implements @shutdown/reboot, which performs a dump, saves1735 * information about which player is associated with which socket,1736 * and then re-execs the mush process without closing the sockets.1737 * \endverbatim1738 * \param player the enactor.1739 * \param flag if 0, normal dump; if 1, paranoid dump.1740 */1741 void1742 do_reboot(dbref player, int flag)1743 {1744 if (player == NOTHING) {1745 flag_broadcast(0, 0,1746 T1747 ("GAME: Reboot w/o disconnect from game account, please wait."));1748 } else {1749 flag_broadcast(0, 0,1750 T1751 ("GAME: Reboot w/o disconnect by %s, please wait."),1752 Name(Owner(player)));1753 }1754 if (flag) {1755 globals.paranoid_dump = 1;1756 globals.paranoid_checkpt = db_top / 5;1757 if (globals.paranoid_checkpt < 1)1758 globals.paranoid_checkpt = 1;1759 }1760 #ifdef HAS_OPENSSL1761 close_ssl_connections();1762 #endif1763 sql_shutdown();1764 shutdown_queues();1765 fork_and_dump(0);1766 #ifndef PROFILING1767 #ifndef WIN321768 /* Some broken libcs appear to retain the itimer across exec!1769 * So we make sure that if we get a SIGPROF in our next incarnation,1770 * we ignore it until our proper handler is set up.1771 */1772 ignore_signal(SIGPROF);1773 #endif1774 #endif1775 dump_reboot_db();1776 #ifdef INFO_SLAVE1777 kill_info_slave();1778 #endif1779 local_shutdown();1780 end_all_logs();1781 #ifndef WIN321782 execl("netmush", "netmush", confname, NULL);1783 #else1784 execl("pennmush.exe", "pennmush.exe", "/run", NULL);1785 #endif /* WIN32 */1786 exit(1); /* Shouldn't ever get here, but just in case... */1787 }1788 1789 1790 1731 static int 1791 1732 fill_search_spec(dbref player, const char *owner, int nargs, const char **args,
