Memcached mlockall() fix

Brad Fitzpatrick brad at
Wed Jan 19 17:45:45 PST 2005

Looks like it was already fixed some time ago.

Any reason you guys are using 1.1.10 instead of 1.1.11 or 1.1.12-rc1?

- Brad

On Wed, 19 Jan 2005, Kate Turner wrote:

> Hello,
> We had a problem with memcached -k not working.  The problem seems to
> be that daemon(), setuid() and mlockall() are called in the wrong
> order.  Specifically, the mlockall must be after daemon() (because it
> does not follow fork()) and before setuid() (because it requires root
> to take effect).  A patch to implement this can be found at
> <> (sorry, it's
> against 1.1.10 - apologies if this was fixed in a later version).  I
> also added a setrlimit() to increase the locked memory limit to
> unlimited, and some more error checking.  This has only been tested on
> Linux, but seems to work.
> Thanks,
> Kate.

More information about the memcached mailing list