Skip to content

Commit

Permalink
comment on using init() for libcontainer handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmood Ali committed Apr 19, 2019
1 parent 9bf54ea commit 6747195
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/shared/executor/libcontainer_nsenter_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (
// init is only run on linux and is used when the LibcontainerExecutor starts
// a new process. The libcontainer shim takes over the process, setting up the
// configured isolation and limitions before execve into the user process
//
// This subcommand handler is implemented as an `init`, libcontainer shim is handled anywhere
// this package is used (including tests) without needing to write special command handler.
func init() {
if len(os.Args) > 1 && os.Args[1] == "libcontainer-shim" {
runtime.GOMAXPROCS(1)
Expand Down

0 comments on commit 6747195

Please sign in to comment.