Commit 07cf75a0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Attempt to mlock(2) SHMFILE in core.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2558 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 842d8cef
......@@ -347,6 +347,10 @@ VSL_MgtInit(const char *fn, unsigned size)
MAP_HASSEMAPHORE | MAP_NOSYNC | MAP_SHARED,
heritage.vsl_fd, 0);
xxxassert(loghead != MAP_FAILED);
i = mlock(loghead, heritage.vsl_size);
if (i != 0)
fprintf(stderr, "Notice: locking SHMFILE in core failed: %s\n",
strerror(errno));
VSL_stats = &loghead->stats;
pp = (void *)(loghead + 1);
*pp = *params;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment