From 56fd626fe710f24201b1f413f8b7b28a919df0c4 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 25 Aug 2005 17:46:13 +0000 Subject: r9619: Fix messages_pending_for_pid actually do what it's meant to do. This might be a big relief on messages.tdb contention as ignoring processes with >1000 messages in printing/notify.c should work correctly now. Jeremy, Jerry told me to ask you about printer scalability torture tests, this might be a reason why you implemented the message_send_pid_with_timeout using the signal (shudder) in the first place. :-) While looking at that... Wouldn't it be better to not use the signal but have an overall timeout for print_notify_send_messages using GetTimeOfDay & friends and not use the alarm signal deep inside tdb.c? Volker (This used to be commit b5e82bb512d3425839e061e78f4d6fe0bd05b708) --- source3/lib/messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib') diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 21b5531c89..7d3addd86a 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -314,7 +314,7 @@ unsigned int messages_pending_for_pid(pid_t pid) char *buf; unsigned int message_count = 0; - kbuf = message_key_pid(sys_getpid()); + kbuf = message_key_pid(pid); dbuf = tdb_fetch(tdb, kbuf); if (dbuf.dptr == NULL || dbuf.dsize == 0) { -- cgit