github.com/apptainer/singularity@v3.1.1+incompatible/pkg/util/namespaces/setns_unsupported.go (about) 1 // Copyright (c) 2018, Sylabs Inc. All rights reserved. 2 // This software is licensed under a 3-clause BSD license. Please consult the 3 // LICENSE.md file distributed with the sources of this project regarding your 4 // rights to use or distribute this software. 5 6 // +build !go1.10 !linux 7 8 package namespaces 9 10 import ( 11 "fmt" 12 "runtime" 13 ) 14 15 // Enter enters in provided process namespace. 16 func Enter(pid int, namespace string) error { 17 if runtime.GOOS != "linux" { 18 return fmt.Errorf("%s system is unsupported", runtime.GOOS) 19 } 20 return fmt.Errorf("using setns requires a compilation with Go version >= 1.10") 21 }