external_cmd_unix_test.go 383 B

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