File: 0005-go.mod-github.com-containerd-go-runc-v1.1.0.patch

package info (click to toggle)
containerd 1.7.24~ds1-8
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 15,164 kB
  • sloc: sh: 1,356; makefile: 582
file content (35 lines) | stat: -rw-r--r-- 1,038 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Date: Wed, 17 May 2023 13:39:31 +0900
Subject: go.mod: github.com/containerd/go-runc v1.1.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
---
 sys/reaper/reaper_unix.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sys/reaper/reaper_unix.go b/sys/reaper/reaper_unix.go
index bfc9a95..7ad69b5 100644
--- a/sys/reaper/reaper_unix.go
+++ b/sys/reaper/reaper_unix.go
@@ -22,6 +22,7 @@ import (
 	"errors"
 	"fmt"
 	"os/exec"
+	"runtime"
 	"sync"
 	"syscall"
 	"time"
@@ -100,6 +101,13 @@ func (m *Monitor) Start(c *exec.Cmd) (chan runc.Exit, error) {
 	return ec, nil
 }
 
+// StartLocked starts the command and registers the process with the reaper
+func (m *Monitor) StartLocked(c *exec.Cmd) (chan runc.Exit, error) {
+	runtime.LockOSThread()
+	defer runtime.UnlockOSThread()
+	return m.Start(c)
+}
+
 // Wait blocks until a process is signal as dead.
 // User should rely on the value of the exit status to determine if the
 // command was successful or not.