From: Michael Tokarev Date: Mon, 18 May 2009 12:49:39 +0000 (+0400) Subject: bugfix: move mlock to after detach() so it works for child, not parent X-Git-Tag: release-1.0.10~75 X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=6be5d4f5b67764115b37528d2fe01bd245b3cd3e;hp=6be5d4f5b67764115b37528d2fe01bd245b3cd3e bugfix: move mlock to after detach() so it works for child, not parent mlock()/mlockall() are not persistent across fork(), and it's done in parent process before daemon() which does fork(). So basically, current --mlock does nothing useful. Move mlock() to after detach() so it works for child process instead of parent. Also, check if the platform supports mlock right when processing options (since else we'll have to die after startup, not at startup, the error message will be in log only). ---