This repository was archived by the owner on Nov 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +59
-2
lines changed Expand file tree Collapse file tree 3 files changed +59
-2
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,13 @@ func RunDocker(childExit chan bool, args ...string) error {
106
106
if cmd .Process == nil {
107
107
continue // can happen if receiving signal before the process is actually started
108
108
}
109
- // nolint errcheck
110
- cmd .Process .Signal (sig )
109
+ // In go1.14+, the go runtime issues SIGURG as an interrupt to
110
+ // support preemptable system calls on Linux. Since we can't
111
+ // forward that along we'll check that here.
112
+ if isRuntimeSig (sig ) {
113
+ continue
114
+ }
115
+ _ = cmd .Process .Signal (sig )
111
116
case <- childExit :
112
117
return
113
118
}
Original file line number Diff line number Diff line change
1
+ // +build !windows
2
+
3
+ /*
4
+ Copyright 2020 Docker Compose CLI authors
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ */
18
+
19
+ package mobycli
20
+
21
+ import (
22
+ "os"
23
+
24
+ "golang.org/x/sys/unix"
25
+ )
26
+
27
+ func isRuntimeSig (s os.Signal ) bool {
28
+ return s == unix .SIGURG
29
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2020 Docker Compose CLI authors
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ package mobycli
18
+
19
+ import "os"
20
+
21
+ func isRuntimeSig (s os.Signal ) bool {
22
+ return false
23
+ }
You can’t perform that action at this time.
0 commit comments