summaryrefslogtreecommitdiffstats
path: root/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch
diff options
context:
space:
mode:
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.patch17
1 files changed, 10 insertions, 7 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..98b02044 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
@@ -33,15 +33,17 @@ Index: git/src/import/signals.go
33=================================================================== 33===================================================================
34--- git.orig/src/import/signals.go 34--- git.orig/src/import/signals.go
35+++ git/src/import/signals.go 35+++ git/src/import/signals.go
36@@ -6,6 +6,7 @@ 36@@ -5,7 +5,9 @@
37 import (
37 "os" 38 "os"
38 "os/signal" 39 "os/signal"
39 "syscall" // only for Signal 40+ "syscall" // only for Signal
40+ "strconv"
41 41
42+ "strconv"
42 "github.com/opencontainers/runc/libcontainer" 43 "github.com/opencontainers/runc/libcontainer"
43 "github.com/opencontainers/runc/libcontainer/system" 44 "github.com/opencontainers/runc/libcontainer/system"
44@@ -56,9 +57,6 @@ 45 "github.com/opencontainers/runc/libcontainer/utils"
46@@ -55,9 +57,6 @@
45 func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach bool) (int, error) { 47 func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach bool) (int, error) {
46 // make sure we know the pid of our main process so that we can return 48 // make sure we know the pid of our main process so that we can return
47 // after it dies. 49 // after it dies.
@@ -51,12 +53,13 @@ Index: git/src/import/signals.go
51 53
52 pid1, err := process.Pid() 54 pid1, err := process.Pid()
53 if err != nil { 55 if err != nil {
54@@ -68,11 +66,60 @@ 56@@ -67,12 +66,61 @@
55 if h.notifySocket != nil { 57 if h.notifySocket != nil {
56 if detach { 58 if detach {
57 h.notifySocket.run(pid1) 59 h.notifySocket.run(pid1)
58- return 0, nil 60- return 0, nil
59 } 61 }
62 h.notifySocket.run(os.Getpid())
60 go h.notifySocket.run(0) 63 go h.notifySocket.run(0)
61 } 64 }
62 65
@@ -117,7 +120,7 @@ Index: git/src/import/utils_linux.go
117=================================================================== 120===================================================================
118--- git.orig/src/import/utils_linux.go 121--- git.orig/src/import/utils_linux.go
119+++ git/src/import/utils_linux.go 122+++ git/src/import/utils_linux.go
120@@ -347,7 +347,7 @@ 123@@ -349,7 +349,7 @@
121 if err != nil { 124 if err != nil {
122 r.terminate(process) 125 r.terminate(process)
123 } 126 }
@@ -125,4 +128,4 @@ Index: git/src/import/utils_linux.go
125+ if (detach && os.Getenv("SIGUSR1_PARENT_PID") == "") { 128+ if (detach && os.Getenv("SIGUSR1_PARENT_PID") == "") {
126 return 0, nil 129 return 0, nil
127 } 130 }
128 r.destroy() 131 if err == nil {