From b332ef44cfaf226140c7e47e4fefbbe602676519 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Mon, 12 Sep 2011 22:01:03 +0200 Subject: [PATCH] ipcmk: allow high speed ipc creation This commit will allow user to create quickly plenty of ipc resources. Earlier the line bellow gave no satisfaction. for i in $(seq 0 42); do ipcmk -Q; done Signed-off-by: Sami Kerola --- sys-utils/ipcmk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys-utils/ipcmk.c b/sys-utils/ipcmk.c index b4bc5be197..c91908bde8 100644 --- a/sys-utils/ipcmk.c +++ b/sys-utils/ipcmk.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "c.h" #include "nls.h" @@ -36,7 +36,9 @@ key_t create_key(void) { - srandom(time(NULL)); + struct timeval now; + gettimeofday(&now, NULL); + srandom(now.tv_usec); return random(); } -- 2.47.2