Created
January 5, 2016 18:40
-
-
Save duglin/be07fcccb5a5f82778b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libcontainer/standard_init_linux.go b/libcontainer/standard_init_li | |
index ec10057..7230f0f 100644 | |
--- a/libcontainer/standard_init_linux.go | |
+++ b/libcontainer/standard_init_linux.go | |
@@ -109,5 +109,11 @@ func (l *linuxStandardInit) Init() error { | |
if syscall.Getppid() != l.parentPid { | |
return syscall.Kill(syscall.Getpid(), syscall.SIGKILL) | |
} | |
+ | |
+ // Special case - just sleep forever | |
+ if len(l.config.Args) == 0 || l.config.Args[0] == "#sleep" { | |
+ select {} | |
+ } | |
+ | |
return system.Execv(l.config.Args[0], l.config.Args[0:], os.Environ()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment