Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for openPipe (0.15 sec)

  1. src/cmd/go/internal/fsys/fsys.go

    	Trace("Open", path)
    	return openFile(path, os.O_RDONLY, 0)
    }
    
    func openFile(path string, flag int, perm os.FileMode) (*os.File, error) {
    	cpath := canonicalize(path)
    	if node, ok := overlay[cpath]; ok {
    		// Opening a file in the overlay.
    		if node.isDir() {
    			return nil, &fs.PathError{Op: "OpenFile", Path: path, Err: errors.New("fsys.OpenFile doesn't support opening directories yet")}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:35:34 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. src/cmd/vendor/golang.org/x/telemetry/internal/upload/upload.go

    		// up). Ensure that cleanup occurs.
    		_ = os.Remove(fname)
    		return false
    	}
    
    	// Lock the upload, to prevent duplicate uploads.
    	{
    		lockname := newname + ".lock"
    		lockfile, err := os.OpenFile(lockname, os.O_CREATE|os.O_EXCL, 0666)
    		if err != nil {
    			u.logger.Printf("Failed to acquire lock %s: %v", lockname, err)
    			return false
    		}
    		_ = lockfile.Close()
    		defer os.Remove(lockname)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/telemetry/start.go

    	} else if fd.IsDir() {
    		// local/debug exists and is a directory. Set stderr to a log file path
    		// in local/debug.
    		childLogPath := filepath.Join(telemetry.Default.DebugDir(), "sidecar.log")
    		childLog, err := os.OpenFile(childLogPath, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600)
    		if err != nil {
    			log.Fatalf("opening sidecar log file for child: %v", err)
    		}
    		defer childLog.Close()
    		cmd.Stderr = childLog
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  7. cmd/erasure-healing-common_test.go

    					// and check if that disk
    					// appears in outDatedDisks.
    					tamperedIndex = index
    					filePath := pathJoin(erasureDisks[index].String(), bucket, object, fi.DataDir, "part.1")
    					f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_SYNC, 0)
    					if err != nil {
    						t.Fatalf("Failed to open %s: %s\n", filePath, err)
    					}
    					f.WriteString("oops") // Will cause bitrot error
    					f.Close()
    					break
    				}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 23K bytes
    - Viewed (0)
  8. src/os/removeall_at.go

    // includes a symlink to one), it should return an error. Other than that this
    // should act like openFileNolog.
    //
    // This acts like openFileNolog rather than OpenFile because
    // we are going to (try to) remove the file.
    // The contents of this file are not relevant for test caching.
    func openDirAt(dirfd int, name string) (*File, error) {
    	var r int
    	for {
    		var e error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:26 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  9. cmd/xl-storage.go

    		}
    	}
    
    	return w, nil
    }
    
    func (s *xlStorage) openFileSync(filePath string, mode int, skipParent string) (f *os.File, err error) {
    	return s.openFile(filePath, mode|writeMode, skipParent)
    }
    
    func (s *xlStorage) openFile(filePath string, mode int, skipParent string) (f *os.File, err error) {
    	if skipParent == "" {
    		skipParent = s.drivePath
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 85.3K bytes
    - Viewed (2)
  10. src/cmd/vendor/golang.org/x/telemetry/internal/upload/reports.go

    // and an error indicating whether the operation succeeded.
    // If the file already exists, exclusiveWrite returns (false, nil).
    func exclusiveWrite(filename string, content []byte) (_ bool, rerr error) {
    	f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0644)
    	if err != nil {
    		if os.IsExist(err) {
    			return false, nil
    		}
    		return false, err
    	}
    	defer func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.3K bytes
    - Viewed (0)
Back to top