diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-14 09:58:13 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-14 09:58:13 +0800 |
commit | 31b9bab65b95c6ccabff24b90fa80dc3a8344122 (patch) | |
tree | 33a64e8cd2c1f253a690ce88fad87d255c83aff7 /common/bbs | |
parent | 833d86de55341c2790a09d6770af1458d54fb0a6 (diff) | |
download | pttbbs-31b9bab65b95c6ccabff24b90fa80dc3a8344122.tar pttbbs-31b9bab65b95c6ccabff24b90fa80dc3a8344122.tar.gz pttbbs-31b9bab65b95c6ccabff24b90fa80dc3a8344122.tar.bz2 pttbbs-31b9bab65b95c6ccabff24b90fa80dc3a8344122.tar.lz pttbbs-31b9bab65b95c6ccabff24b90fa80dc3a8344122.tar.xz pttbbs-31b9bab65b95c6ccabff24b90fa80dc3a8344122.tar.zst pttbbs-31b9bab65b95c6ccabff24b90fa80dc3a8344122.zip |
* enable size tag in shm
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4842 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'common/bbs')
-rw-r--r-- | common/bbs/cache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/bbs/cache.c b/common/bbs/cache.c index a23326bd..e224e5f4 100644 --- a/common/bbs/cache.c +++ b/common/bbs/cache.c @@ -104,6 +104,12 @@ attach_SHM(void) "or use ipcrm(1) command to clean share memory.\n"); exit(1); } + if(SHM->size != sizeof(SHM_t)) { + fprintf(stderr, "Error: SHM->size(%d) != sizeof(SHM_t)(%d)\n", SHM->size, sizeof(SHM_t)); + fprintf(stderr, "Please use the configuration corresponding to SHM,\n" + "or use ipcrm(1) command to clean share memory.\n"); + exit(1); + } if (!SHM->loaded) /* (uhash) assume fresh shared memory is * zeroed */ exit(1); |