forked from security/hakurei
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>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user