mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
remove the CLONE_NEWNET isolation option as it's performance cost is too high
This commit is contained in:
@@ -55,7 +55,12 @@ pid_t safe_fork(void)
|
||||
{
|
||||
#if defined(__linux__) && defined(ENABLE_LINUX_NS)
|
||||
long ret;
|
||||
int flags = SIGCHLD|CLONE_NEWPID|CLONE_NEWNET|CLONE_NEWIPC;
|
||||
/* fork: 100%
|
||||
* CLONE_NEWPID|CLONE_NEWNET|CLONE_NEWIPC: 3%
|
||||
* CLONE_NEWPID|CLONE_NEWIPC: 27%
|
||||
* CLONE_NEWPID: 36%
|
||||
*/
|
||||
int flags = SIGCHLD|CLONE_NEWPID|CLONE_NEWIPC;
|
||||
ret = syscall(SYS_clone, flags, 0, 0, 0);
|
||||
if (ret == 0 && syscall(SYS_getpid)!= 1)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user