{"modulePath":"github.com/hack-pad/hackpad","version":"v0.0.0-20230421052307-f5de9aec72b4","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package process\n\n## Functions\n\n```go\nfunc Dump() interface{}\n```\n\n```go\nfunc Init(switchedContext func(PID, PID))\n```\n\n## Types\n\n```go\ntype PID = common.PID\n```\n\n```go\ntype ProcAttr struct {\n\tDir   string\n\tEnv   map[string]string\n\tFiles []fs.Attr\n}\n```\nProcAttr is functionally identical to os.ProcAttr. Env is structured as a map (instead of key=value pairs), and files is purely a list of nil-able file descriptor IDs. nil FIDs are to be effectively closed to the new process.\n\n```go\ntype Process interface {\n\tPID() PID\n\tParentPID() PID\n\n\tStart() error\n\tWait() (exitCode int, err error)\n\tFiles() *fs.FileDescriptors\n\tWorkingDirectory() string\n\tSetWorkingDirectory(wd string) error\n}\n```\n\n```go\nfunc Current() Process\n```\n\n```go\nfunc Get(pid PID) (process Process, ok bool)\n```\n\n```go\nfunc New(command string, args []string, attr *ProcAttr) (Process, error)\n```\n\n","path":"github.com/hack-pad/hackpad/internal/process","name":"process","synopsis":"","isRedistributable":true}
