github.com/markusbkk/elvish@v0.0.0-20231204143114-91dc52438621/pkg/eval/external_cmd_unix_test.go (about)

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