diff options
Diffstat (limited to 'recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch')
-rw-r--r-- | recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch b/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch index 0af74952..d3d1134b 100644 --- a/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch +++ b/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch @@ -23,6 +23,8 @@ is set. because it was blocking until runc performed everything it was required to perform. +Upstream-Status: Inappropriate [embedded specific] + Signed-off-by: Jason Wessel <jason.wessel@windriver.com> --- signals.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++---- @@ -33,15 +35,17 @@ Index: git/src/import/signals.go =================================================================== --- git.orig/src/import/signals.go +++ git/src/import/signals.go -@@ -6,6 +6,7 @@ +@@ -5,7 +5,9 @@ + import ( "os" "os/signal" - "syscall" // only for Signal -+ "strconv" ++ "syscall" // only for Signal ++ "strconv" "github.com/opencontainers/runc/libcontainer" "github.com/opencontainers/runc/libcontainer/system" -@@ -56,9 +57,6 @@ + "github.com/opencontainers/runc/libcontainer/utils" +@@ -55,9 +57,6 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach bool) (int, error) { // make sure we know the pid of our main process so that we can return // after it dies. @@ -51,13 +55,14 @@ Index: git/src/import/signals.go pid1, err := process.Pid() if err != nil { -@@ -68,11 +66,60 @@ +@@ -67,12 +66,61 @@ if h.notifySocket != nil { if detach { - h.notifySocket.run(pid1) + _ = h.notifySocket.run(pid1) - return 0, nil } - go h.notifySocket.run(0) + _ = h.notifySocket.run(os.Getpid()) + go func() { _ = h.notifySocket.run(0) }() } + if (detach) { @@ -117,7 +122,7 @@ Index: git/src/import/utils_linux.go =================================================================== --- git.orig/src/import/utils_linux.go +++ git/src/import/utils_linux.go -@@ -347,7 +347,7 @@ +@@ -345,7 +345,7 @@ if err != nil { r.terminate(process) } @@ -125,4 +130,4 @@ Index: git/src/import/utils_linux.go + if (detach && os.Getenv("SIGUSR1_PARENT_PID") == "") { return 0, nil } - r.destroy() + if err == nil { |