aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/outcome/main_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-02 04:41:26 +0900
committerOphestra <cat@gensokyo.uk>2025-11-02 04:41:26 +0900
commit6931ad95c3e7d0acb45b2aafe24fb63012f061a5 (patch)
treecfb1b22fe1cdf51c15b0519224aa4d3bb4bd66cd /internal/outcome/main_test.go
parent2ba599b3997f9d4270e533ee0d0e7c235414b31a (diff)
internal/outcome/shim: EOF as exit request fallback
In some cases the signal might be delivered before the signal handler is installed, and synchronising against such a case is too expensive. Instead, use the pipe being closed as a fallback to the regular exit request. This change also moves installation of the signal handler early. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome/main_test.go')
-rw-r--r--internal/outcome/main_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/outcome/main_test.go b/internal/outcome/main_test.go
index ee1c0374..85a177d8 100644
--- a/internal/outcome/main_test.go
+++ b/internal/outcome/main_test.go
@@ -700,9 +700,10 @@ type stubNixOS struct {
panicDispatcher
}
-func (k *stubNixOS) getpid() int { return 0xdeadbeef }
-func (k *stubNixOS) getuid() int { return 1971 }
-func (k *stubNixOS) getgid() int { return 100 }
+func (k *stubNixOS) getppid() int { return 0xbad }
+func (k *stubNixOS) getpid() int { return 0xdeadbeef }
+func (k *stubNixOS) getuid() int { return 1971 }
+func (k *stubNixOS) getgid() int { return 100 }
func (k *stubNixOS) lookupEnv(key string) (string, bool) {
switch key {