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 (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
func create(name string) error {
|
func create(name string) error {
|
||||||
|
runtime.LockOSThread()
|
||||||
|
defer runtime.UnlockOSThread()
|
||||||
|
|
||||||
base := "/var/run/netns"
|
base := "/var/run/netns"
|
||||||
path := base + "/" + name
|
path := base + "/" + name
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue