summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-27 18:11:39 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-27 18:11:39 +0800
commit6b83336471190ccd09f35a63610f6ed16a44c2de (patch)
tree982af09eef772584a18fbc2f76d6e08d012308a1
parente9f7bb2ad9e16562d95b6f696e2654d111b1f3d3 (diff)
downloadpttbbs-6b83336471190ccd09f35a63610f6ed16a44c2de.tar
pttbbs-6b83336471190ccd09f35a63610f6ed16a44c2de.tar.gz
pttbbs-6b83336471190ccd09f35a63610f6ed16a44c2de.tar.bz2
pttbbs-6b83336471190ccd09f35a63610f6ed16a44c2de.tar.lz
pttbbs-6b83336471190ccd09f35a63610f6ed16a44c2de.tar.xz
pttbbs-6b83336471190ccd09f35a63610f6ed16a44c2de.tar.zst
pttbbs-6b83336471190ccd09f35a63610f6ed16a44c2de.zip
error handle
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@444 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/cache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 0ceb8376..2ddfefb4 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -1,4 +1,4 @@
-/* $Id: cache.c,v 1.44 2002/07/22 19:02:00 in2 Exp $ */
+/* $Id: cache.c,v 1.45 2002/07/27 10:11:39 kcwu Exp $ */
#include "bbs.h"
#ifndef __FreeBSD__
@@ -114,7 +114,10 @@ sem_lock(int op, int semid)
sops.sem_num = 0;
sops.sem_flg = SEM_UNDO;
sops.sem_op = op;
- semop(semid, &sops, 1);
+ if (semop(semid, &sops, 1)) {
+ perror("semop");
+ exit(1);
+ }
}
/* uhash ****************************************** */