Codebase list golang-github-cloudflare-tableflip / debian/0.0_git20190329.8392f16-2 env.go
debian/0.0_git20190329.8392f16-2

Tree @debian/0.0_git20190329.8392f16-2 (Download .tar.gz)

env.go @debian/0.0_git20190329.8392f16-2raw · history · blame

package tableflip

import (
	"os"
	"syscall"
)

var stdEnv = &env{
	newProc:     newOSProcess,
	newFile:     os.NewFile,
	environ:     os.Environ,
	getenv:      os.Getenv,
	closeOnExec: syscall.CloseOnExec,
}

type env struct {
	newProc     func(string, []string, []*os.File, []string) (process, error)
	newFile     func(fd uintptr, name string) *os.File
	environ     func() []string
	getenv      func(string) string
	closeOnExec func(fd int)
}