- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for ProcAttr (0.13 sec)
-
src/os/exec_plan9.go
var ( Interrupt Signal = syscall.Note("interrupt") Kill Signal = syscall.Note("kill") ) func startProcess(name string, argv []string, attr *ProcAttr) (p *Process, err error) { sysattr := &syscall.ProcAttr{ Dir: attr.Dir, Env: attr.Env, Sys: attr.Sys, } sysattr.Files = make([]uintptr, 0, len(attr.Files)) for _, f := range attr.Files {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 22:06:47 UTC 2024 - 3.4K bytes - Viewed (0) -
src/os/exec_unix_test.go
"math" . "os" "runtime" "syscall" "testing" ) func TestErrProcessDone(t *testing.T) { testenv.MustHaveGoBuild(t) t.Parallel() p, err := StartProcess(testenv.GoToolPath(t), []string{"go"}, &ProcAttr{}) if err != nil { t.Fatalf("starting test process: %v", err) } p.Wait() if got := p.Signal(Kill); got != ErrProcessDone { t.Errorf("got %v want %v", got, ErrProcessDone) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 18:08:44 UTC 2024 - 2K bytes - Viewed (0) -
src/os/pidfd_linux_test.go
if err := os.CheckPidfdOnce(); err != nil { // Non-pidfd code paths tested in exec_unix_test.go. t.Skipf("skipping: pidfd not available: %v", err) } p, err := os.StartProcess(testenv.GoToolPath(t), []string{"go"}, &os.ProcAttr{}) if err != nil { t.Fatalf("starting test process: %v", err) } p.Wait() // Use pid of a non-existing process. proc, err := os.FindProcess(p.Pid) // FindProcess should never return errors on Unix.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 18:08:44 UTC 2024 - 1.6K bytes - Viewed (0) -
src/os/exec_posix.go
// sending a signal. var ( Interrupt Signal = syscall.SIGINT Kill Signal = syscall.SIGKILL ) func startProcess(name string, argv []string, attr *ProcAttr) (p *Process, err error) { // If there is no SysProcAttr (ie. no Chroot or changed // UID/GID), double-check existence of the directory we want // to chdir into. We can make the error clearer this way.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 22:06:47 UTC 2024 - 3.7K bytes - Viewed (0) -
src/os/exec_test.go
r, w, err := os.Pipe() if err != nil { t.Fatalf("Pipe() got err %v, want nil", err) } defer r.Close() defer w.Close() p, err := os.StartProcess(testenv.GoToolPath(t), []string{"go"}, &os.ProcAttr{ // N.B. On Windows, StartProcess requires exactly 3 Files. Pass // in a dummy pipe to avoid irrelevant output on the test stdout. Files: []*os.File{r, w, w}, }) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 18:08:44 UTC 2024 - 1.8K bytes - Viewed (0) -
src/os/exec.go
// returning the wait status, while future calls error with "process // released" rather than "process done". p.state.CompareAndSwap(0, uint64(reason)) } // ProcAttr holds the attributes that will be applied to a new process // started by StartProcess. type ProcAttr struct { // If Dir is non-empty, the child changes into the directory before // creating the process. Dir string
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 22:06:47 UTC 2024 - 12.8K bytes - Viewed (0) -
src/syscall/exec_linux.go
// or, if Pgid == 0, to the new child's process ID. Setpgid bool // Setctty sets the controlling terminal of the child to // file descriptor Ctty. Ctty must be a descriptor number // in the child process: an index into ProcAttr.Files. // This is only meaningful if Setsid is true. Setctty bool Noctty bool // Detach fd 0 from controlling terminal. Ctty int // Controlling TTY fd.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 07:45:37 UTC 2024 - 23K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_cache_inputs.txt
} f.Readdirnames(-1) f.Close() } func TestExec(t *testing.T) { // Note: not using os/exec to make sure there is no unexpected stat. p, err := os.StartProcess("./script.sh", []string{"script"}, new(os.ProcAttr)) if err != nil { t.Fatal(err) } ps, err := p.Wait() if err != nil { t.Fatal(err) } if !ps.Success() { t.Fatalf("script failed: %v", err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Mar 09 22:23:53 UTC 2024 - 6.3K bytes - Viewed (0) -
src/os/os_test.go
return func(t *testing.T) { t.Parallel() r, w, err := Pipe() if err != nil { t.Fatalf("Pipe: %v", err) } defer r.Close() attr := &ProcAttr{Dir: dir, Files: []*File{nil, w, Stderr}} p, err := StartProcess(cmd, args, attr) if err != nil { t.Fatalf("StartProcess: %v", err) } w.Close() var b strings.Builder io.Copy(&b, r)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 83.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"PathError.Path", Field, 0}, {"PathListSeparator", Const, 0}, {"PathSeparator", Const, 0}, {"Pipe", Func, 0}, {"ProcAttr", Type, 0}, {"ProcAttr.Dir", Field, 0}, {"ProcAttr.Env", Field, 0}, {"ProcAttr.Files", Field, 0}, {"ProcAttr.Sys", Field, 0}, {"Process", Type, 0}, {"Process.Pid", Field, 0}, {"ProcessState", Type, 0}, {"ReadDir", Func, 16},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)