f-15: fix: error in thread
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
1e7575bc7d
commit
049cabc489
1 changed files with 4 additions and 0 deletions
|
|
@ -4,11 +4,15 @@ package netns
|
|||
|
||||
import (
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func create(name string) error {
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
|
||||
base := "/var/run/netns"
|
||||
path := base + "/" + name
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue