[Sheepdog] [PATCH] use semop instead of setimedop

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Thu Apr 8 09:31:31 CEST 2010


seems that we lost too many log messages. it's not good to let the
main daemon sleep for long time but let's see how it works.

Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
 lib/logger.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/logger.c b/lib/logger.c
index e30b698..fb864f3 100644
--- a/lib/logger.c
+++ b/lib/logger.c
@@ -293,8 +293,8 @@ static void dolog(int prio, const char *func, int line, const char *fmt, va_list
 		ops.sem_num = 0;
 		ops.sem_flg = 0;
 		ops.sem_op = -1;
-		if (semtimedop(la->semid, &ops, 1, &ts) < 0) {
-			syslog(LOG_ERR, "semop up failed");
+		if (semop(la->semid, &ops, 1) < 0) {
+			syslog(LOG_ERR, "semop up failed %m");
 			return;
 		}
 
-- 
1.7.0




More information about the sheepdog mailing list