Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 154 for openPipe (0.15 sec)

  1. src/os/file_unix.go

    type newFileKind int
    
    const (
    	// kindNewFile means that the descriptor was passed to us via NewFile.
    	kindNewFile newFileKind = iota
    	// kindOpenFile means that the descriptor was opened using
    	// Open, Create, or OpenFile.
    	kindOpenFile
    	// kindPipe means that the descriptor was opened using Pipe.
    	kindPipe
    	// kindSock means that the descriptor is a network file descriptor
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 13:52:34 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  2. src/cmd/go/testdata/script/test_fuzz_mutator_repeat.txt

    )
    
    var wantFlag = flag.String("want", "", "file containing previous crashing input")
    
    func FuzzRepeat(f *testing.F) {
    	i := 0
    	f.Fuzz(func(t *testing.T, b []byte) {
    		i++
    		if i == 100 {
    			f, err := os.OpenFile("want", os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0666)
    			if err != nil {
    				// Couldn't create the file. Return without crashing, and try
    				// again.
    				i--
    				t.Skip(err)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 16 16:53:11 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. src/cmd/go/terminal_test.go

    		r, processTTY, err := testpty.Open()
    		if errors.Is(err, testpty.ErrNotSupported) {
    			t.Skipf("%s", err)
    		} else if err != nil {
    			t.Fatalf("failed to open test PTY: %s", err)
    		}
    		defer r.Close()
    		w, err := os.OpenFile(processTTY, os.O_RDWR, 0)
    		if err != nil {
    			t.Fatal(err)
    		}
    		defer w.Close()
    		stdout, stderr := runTerminalPassthrough(t, r, w)
    		if !stdout {
    			t.Errorf("stdout is not a terminal")
    		}
    		if !stderr {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 07 18:18:50 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  4. tools/istio-iptables/pkg/dependencies/stub.go

    func (s *DependenciesStub) writeAllToDryRunPath() error {
    	path := DryRunFilePath.Get()
    	if path != "" {
    		// Print the input into the given output file.
    		f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, 0o644)
    		if err != nil {
    			return fmt.Errorf("unable to open dry run output file %v: %v", path, err)
    		}
    
    		defer f.Close()
    
    		for _, line := range s.ExecutedAll {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 11 17:46:23 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. pkg/file/file.go

    	in, err := os.Open(srcFilepath)
    	if err != nil {
    		return err
    	}
    	defer in.Close()
    
    	perm, err := in.Stat()
    	if err != nil {
    		return err
    	}
    
    	out, err := os.OpenFile(filepath.Join(targetDir, targetFilename), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm.Mode())
    	if err != nil {
    		return err
    	}
    	defer out.Close()
    
    	if _, err := io.Copy(out, in); err != nil {
    		return err
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 11 21:42:29 UTC 2024
    - 3K bytes
    - Viewed (0)
  6. src/syscall/exec_unix_test.go

    		t.Fatalf("Child 1 and 2 are not in the same process group")
    	}
    }
    
    func TestForeground(t *testing.T) {
    	signal.Ignore(syscall.SIGTTIN, syscall.SIGTTOU)
    	defer signal.Reset()
    
    	tty, err := os.OpenFile("/dev/tty", os.O_RDWR, 0)
    	if err != nil {
    		t.Skipf("Can't test Foreground. Couldn't open /dev/tty: %s", err)
    	}
    	defer tty.Close()
    
    	ttyFD := int(tty.Fd())
    
    	fpgrp, err := syscall.Tcgetpgrp(ttyFD)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 04:41:27 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  7. src/go/build/build.go

    		for i, fi := range fis {
    			des[i] = fs.FileInfoToDirEntry(fi)
    		}
    		return des, nil
    	}
    	return os.ReadDir(path)
    }
    
    // openFile calls ctxt.OpenFile (if not nil) or else os.Open.
    func (ctxt *Context) openFile(path string) (io.ReadCloser, error) {
    	if fn := ctxt.OpenFile; fn != nil {
    		return fn(path)
    	}
    
    	f, err := os.Open(path)
    	if err != nil {
    		return nil, err // nil interface
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
  8. src/os/exec_plan9.go

    	if e != nil {
    		return nil, &PathError{Op: "fork/exec", Path: name, Err: e}
    	}
    
    	return newPIDProcess(pid), nil
    }
    
    func (p *Process) writeProcFile(file string, data string) error {
    	f, e := OpenFile("/proc/"+itoa.Itoa(p.Pid)+"/"+file, O_WRONLY, 0)
    	if e != nil {
    		return e
    	}
    	defer f.Close()
    	_, e = f.Write([]byte(data))
    	return e
    }
    
    func (p *Process) signal(sig Signal) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  9. src/os/signal/signal_plan9_test.go

    		case s := <-c:
    			t.Fatalf("unexpected signal %v", s)
    		case <-time.After(100 * time.Millisecond):
    			// nothing to read - good
    		}
    	}
    }
    
    func postNote(pid int, note string) error {
    	f, err := os.OpenFile("/proc/"+itoa.Itoa(pid)+"/note", os.O_WRONLY, 0)
    	if err != nil {
    		return err
    	}
    	defer f.Close()
    	_, err = f.Write([]byte(note))
    	return err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Mar 14 17:56:50 UTC 2021
    - 3.6K bytes
    - Viewed (0)
  10. src/os/file.go

    // be used for I/O; the associated file descriptor has mode O_RDWR.
    // If there is an error, it will be of type *PathError.
    func Create(name string) (*File, error) {
    	return OpenFile(name, O_RDWR|O_CREATE|O_TRUNC, 0666)
    }
    
    // OpenFile is the generalized open call; most users will use Open
    // or Create instead. It opens the named file with specified flag
    // (O_RDONLY etc.). If the file does not exist, and the O_CREATE flag
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:37 UTC 2024
    - 25.4K bytes
    - Viewed (0)
Back to top