File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change
1
+ //go:build windows
2
+
3
+ package reaper
4
+
5
+ import "github.com/hashicorp/go-reap"
6
+
7
+ // IsChild returns true if we're the forked process.
8
+ func IsChild () bool {
9
+ return false
10
+ }
11
+
12
+ // IsInitProcess returns true if the current process's PID is 1.
13
+ func IsInitProcess () bool {
14
+ return false
15
+ }
16
+
17
+ func ForkReap (pids reap.PidCh ) error {
18
+ return nil
19
+ }
Original file line number Diff line number Diff line change
1
+ //go:build !windows
2
+
1
3
package reaper_test
2
4
3
5
import (
4
6
"os/exec"
5
- "runtime"
6
7
"testing"
7
8
"time"
8
9
@@ -15,10 +16,6 @@ import (
15
16
func TestReap (t * testing.T ) {
16
17
t .Parallel ()
17
18
18
- if runtime .GOOS != "linux" {
19
- t .Skipf ("Skipping non-Linux OS %q" , runtime .GOOS )
20
- }
21
-
22
19
// Because we're forkexecing these tests will try to run twice...
23
20
if reaper .IsChild () {
24
21
t .Skip ("I'm a child!" )
Original file line number Diff line number Diff line change
1
+ //go:build !windows
2
+
1
3
package reaper
2
4
3
5
import (
You can’t perform that action at this time.
0 commit comments