elvish/pkg/eval/external_cmd_unix_test.go
Qi Xiao f7cb556d9b Require Go 1.18.
- Run "go fix" to remove legacy build tags

- Use staticcheck@master until it has a release that supports Go 1.18

- Turn off autocrlf for Windows tasks
2022-03-20 15:28:23 +00:00

15 lines
383 B
Go

//go:build !windows && !plan9 && !js
package eval_test
import (
"syscall"
)
func exitWaitStatus(exit uint32) syscall.WaitStatus {
// The exit<<8 is gross but I can't find any exported symbols that would
// allow us to construct WaitStatus. So assume legacy UNIX encoding
// for a process that exits normally; i.e., not due to a signal.
return syscall.WaitStatus(exit << 8)
}