Changeset 1187
- Timestamp:
- 01/02/08 06:49:03 (8 months ago)
- Files:
-
- 1.8.3/branches/devel/CHANGES.183 (modified) (3 diffs)
- 1.8.3/branches/devel/config.h.in (modified) (2 diffs)
- 1.8.3/branches/devel/configure (modified) (2 diffs)
- 1.8.3/branches/devel/configure.in (modified) (2 diffs)
- 1.8.3/branches/devel/game/txt/connect.txt (modified) (1 diff)
- 1.8.3/branches/devel/game/txt/hlp/pennv182.hlp (modified) (1 diff)
- 1.8.3/branches/devel/game/txt/hlp/pennv183.hlp (modified) (3 diffs)
- 1.8.3/branches/devel/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.8.3/branches/devel/src/bsd.c (modified) (8 diffs)
- 1.8.3/branches/devel/src/conf.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/branches/devel/CHANGES.183
r1186 r1187 5 5 chronological order (most recent first) 6 6 7 [SW] is Shawn Wagner, a PennMUSH developer (aka Raevnos) 7 [SW] is Shawn Wagner, a PennMUSH developer (aka Raevnos), also 8 responsible for most unattributed changes. 8 9 [EEH] is Ervin Hearn III, a PennMUSH developer (aka Noltar) 9 10 [GM] is Greg Millam, a PennMUSH developer (aka Walker) … … 22 23 * Compile with -mdynamic-no-pic on powerpc OS X, resulting in a smaller 23 24 binary. 25 * On newer Linux systems, detect when various indexed and cached files 26 are changed and automatically reload them instead of waiting for a 27 @readcache. 28 29 Fixes: 30 * Fixes from 1.8.2p9 24 31 25 32 Version 1.8.3 patchlevel 6 Jan 01, 2008 … … 77 84 * Fixed some minor bugs detected by running under valgrind. 78 85 * OpenBSD configuration fixes. 86 * Fixes from 1.8.2p8 79 87 80 88 Version 1.8.3 patchlevel 5 October 6, 2007 1.8.3/branches/devel/config.h.in
r1143 r1187 72 72 73 73 #undef HAVE_SYS_SELECT_H 74 75 #undef HAVE_SYS_INOTIFY_H 74 76 75 77 /* C99ish headers. The first two are really really nice to have. */ … … 303 305 #undef HAVE_FCNTL 304 306 307 #undef HAVE_INOTIFY_INIT 308 309 #ifdef HAVE_INOTIFY_INIT 310 #define HAVE_INOTIFY 311 #endif 312 305 313 /* Variables and defines */ 306 314 1.8.3/branches/devel/configure
r1186 r1187 7495 7495 7496 7496 7497 for ac_header in poll.h sys/epoll.h sys/select.h 7497 7498 for ac_header in poll.h sys/epoll.h sys/select.h sys/inotify.h 7498 7499 do 7499 7500 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 14814 14815 14815 14816 14816 for ac_func in fcntl pselect poll ppoll pollts kqueue epoll_ctl 14817 14818 for ac_func in fcntl pselect poll ppoll pollts kqueue epoll_ctl inotify_init 14817 14819 do 14818 14820 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 1.8.3/branches/devel/configure.in
r1186 r1187 117 117 AC_CHECK_HEADER(sys/types.h, [AC_DEFINE(I_SYS_TYPES)]) 118 118 AC_CHECK_HEADERS([sys/un.h ieeefp.h sys/resource.h sys/event.h sys/uio.h]) 119 AC_CHECK_HEADERS([poll.h sys/epoll.h sys/select.h ])119 AC_CHECK_HEADERS([poll.h sys/epoll.h sys/select.h sys/inotify.h]) 120 120 ### C language support 121 121 # Only need to check C99 and GNU extensions … … 209 209 AC_CHECK_FUNCS([cbrt log2 getuid geteuid seteuid getpriority setpriority]) 210 210 AC_CHECK_FUNCS([socketpair sigaction sigprocmask imaxdiv valloc writev]) 211 AC_CHECK_FUNCS([fcntl pselect poll ppoll pollts kqueue epoll_ctl ])211 AC_CHECK_FUNCS([fcntl pselect poll ppoll pollts kqueue epoll_ctl inotify_init]) 212 212 213 213 AC_FUNC_SNPRINTF 1.8.3/branches/devel/game/txt/connect.txt
r258 r1187 9 9 Use the WHO command to find out who is online currently. 10 10 ----------------------------------------------------------------------------- 11 Yell at your local god to personalize this file!12 11 1.8.3/branches/devel/game/txt/hlp/pennv182.hlp
r1177 r1187 1 & 1.8.2p9 2 Version 1.8.2 patchlevel 9 ??? ??, 2008 3 4 Functions: 5 * The undocumented (And unusable) orpowers() and andpowers() functions 6 were removed. 7 8 Documentation: 9 * andlpowers() and orlpowers() were missing help files. Reported by 10 Parusso. 11 1 12 & 1.8.2p8 2 13 Version 1.8.2 patchlevel 8 Jan 01, 2008 1.8.3/branches/devel/game/txt/hlp/pennv183.hlp
r1166 r1187 1 & 1.8.3p 61 & 1.8.3p7 2 2 & changes 3 3 This is a list of changes in this patchlevel which are probably of … … 12 12 be read in 'help patchlevels'. 13 13 14 Version 1.8.3 patchlevel 7 ??? ??, 2008 15 16 Minor changes: 17 * If compiling with a recent enough version of gcc to support the 18 -fstack-protector option to detect buffer overruns, use it. 19 * Compile with -mdynamic-no-pic on powerpc OS X, resulting in a smaller 20 binary. 21 * On newer Linux systems, detect when various indexed and cached files 22 are changed and automatically reload them instead of waiting for a 23 @readcache. 24 25 Fixes: 26 * Fixes from 1.8.2p9 27 28 & 1.8.3p6 14 29 Version 1.8.3 patchlevel 6 Jan 01, 2008 15 30 … … 66 81 * Fixed some minor bugs detected by running under valgrind. 67 82 * OpenBSD configuration fixes. 83 * Fixes from 1.8.2p8 68 84 69 85 & 1.8.3p5 1.8.3/branches/devel/game/txt/hlp/pennvOLD.hlp
r1166 r1187 4418 4418 type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 4419 4419 4420 1.8.3: 0, 1, 2, 3, 4, 5, 6 4421 1.8.2: 0, 1, 2, 3, 4, 5, 6, 7, 8 4420 1.8.3: 0, 1, 2, 3, 4, 5, 6, 7 4421 1.8.2: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 4422 4422 1.8.1: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 4423 4423 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 1.8.3/branches/devel/src/bsd.c
r1159 r1187 83 83 #include <locale.h> 84 84 #include <setjmp.h> 85 #ifdef HAVE_SYS_INOTIFY_H 86 #include <sys/inotify.h> 87 #endif 85 88 86 89 #include "conf.h" … … 103 106 #include "mysocket.h" 104 107 #include "ident.h" 108 #include "htab.h" 109 #include "help.h" 105 110 106 111 #ifndef WIN32 … … 383 388 static char **saved_argv = NULL; 384 389 390 #ifdef HAVE_INOTIFY 391 int file_watch_init(void); 392 void file_watch_event(int); 393 #endif 394 385 395 #ifndef BOOLEXP_DEBUGGING 386 396 #ifdef WIN32SERVICES … … 868 878 #endif 869 879 unsigned long input_ready, output_ready; 880 #ifdef HAVE_INOTIFY 881 int notify_fd = -1; 882 #endif 870 883 871 884 if (!restarting) { … … 892 905 do_rawlog(LT_ERR, "%d file descriptors available.", avail_descriptors); 893 906 do_rawlog(LT_ERR, "RESTART FINISHED."); 907 908 #ifdef HAVE_INOTIFY 909 notify_fd = file_watch_init(); 910 #endif 894 911 895 912 our_gettimeofday(&then); … … 1002 1019 FD_SET(d->descriptor, &output_set); 1003 1020 } 1021 1022 #ifdef HAVE_INOTIFY 1023 if (notify_fd >= 0) 1024 FD_SET(notify_fd, &input_set); 1025 #endif 1004 1026 1005 1027 found = select(maxd, &input_set, &output_set, (fd_set *) 0, &timeout); … … 1087 1109 } 1088 1110 #endif 1111 #endif 1112 #ifdef HAVE_INOTIFY 1113 if (notify_fd >= 0 && FD_ISSET(notify_fd, &input_set)) 1114 file_watch_event(notify_fd); 1089 1115 #endif 1090 1116 for (d = descriptor_list; d; d = dnext) { … … 4694 4720 exit(1); /* Shouldn't ever get here, but just in case... */ 4695 4721 } 4722 4723 4724 #ifdef HAVE_INOTIFY 4725 /* File modification watching code. Linux-specific for now. 4726 * Future directions include: kqueue() for BSD, fam for linux, irix, others? 4727 * 4728 * The idea to watch help.txt and motd.txt and friends to avoid having 4729 * to do a manual @readcache. Rather than figuring out which exact 4730 * file was changed, just re-read them all on modification of 4731 * any. That will probably change in the future. 4732 */ 4733 4734 extern HASHTAB help_files; 4735 4736 static void 4737 watch_files(int fd) 4738 { 4739 int n; 4740 help_file *h; 4741 4742 #define WATCH(name) do { \ 4743 if (inotify_add_watch(fd, (name), IN_MODIFY | IN_DELETE_SELF) < 0) \ 4744 do_rawlog(LT_TRACE, "file_watch_init:inotify_add_watch(\"%s\"): %s", \ 4745 (name), strerror(errno)); \ 4746 } while (0); 4747 4748 for (n = 0; n < 2; n++) { 4749 WATCH(options.connect_file[n]); 4750 WATCH(options.motd_file[n]); 4751 WATCH(options.wizmotd_file[n]); 4752 WATCH(options.register_file[n]); 4753 WATCH(options.quit_file[n]); 4754 WATCH(options.down_file[n]); 4755 WATCH(options.full_file[n]); 4756 WATCH(options.guest_file[n]); 4757 } 4758 4759 for (h = hash_firstentry(&help_files); h; h = hash_nextentry(&help_files)) 4760 WATCH(h->file); 4761 4762 #undef WATCH 4763 } 4764 4765 /** Start monitoring various useful files for changes. 4766 * \return descriptor of the notification service, or -1 on error 4767 */ 4768 int 4769 file_watch_init(void) 4770 { 4771 int fd = inotify_init(); 4772 4773 if (fd < 0) { 4774 penn_perror("file_watch_init:inotify_init"); 4775 return -1; 4776 } 4777 4778 if (fd >= maxd) 4779 maxd = fd + 1; 4780 4781 watch_files(fd); 4782 4783 make_nonblocking(fd); 4784 4785 return fd; 4786 } 4787 4788 /** Test for modified files and re-read them if indicated. 4789 * \param fd the notification monitorh descriptor 4790 */ 4791 void 4792 file_watch_event(int fd) 4793 { 4794 struct inotify_event ev; 4795 4796 while (read(fd, &ev, sizeof ev) > 0) { 4797 if (ev.mask != IN_IGNORED) { 4798 do_rawlog(LT_TRACE, 4799 "Reloading help indexes and cached files after detecting a change."); 4800 fcache_load(NOTHING); 4801 help_reindex(NOTHING); 4802 watch_files(fd); 4803 } 4804 } 4805 } 4806 4807 #endif 1.8.3/branches/devel/src/conf.c
r1150 r1187 1697 1697 #endif 1698 1698 1699 notify(player, T(" BSD sockets networking in use."));1700 1701 1699 #ifdef HAS_GETDATE 1702 1700 notify(player, T(" Extended convtime() is supported.")); … … 1711 1709 #endif 1712 1710 1713 } 1711 #ifdef HAVE_INOTIFY 1712 notify(player, 1713 T(" Changed help files will be automatically reindexed.")); 1714 #endif 1715 1716 1717 1718 }
