- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 68 for openPipe (0.28 sec)
-
src/os/fifo_test.go
if err := syscall.Mkfifo(name, 0o600); err != nil { t.Fatal(err) } // The problem only occurs if we use O_NONBLOCK here. rd, err := os.OpenFile(name, os.O_RDONLY|syscall.O_NONBLOCK, 0o600) if err != nil { t.Fatal(err) } wr, err := os.OpenFile(name, os.O_WRONLY|syscall.O_NONBLOCK, 0o600) if err != nil { t.Fatal(err) } const msg = "message"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:47:23 UTC 2024 - 6.1K bytes - Viewed (0) -
src/embed/embed.go
} ofile, ok := file.(*openFile) if !ok { return nil, &fs.PathError{Op: "read", Path: name, Err: errors.New("is a directory")} } return []byte(ofile.f.data), nil } // An openFile is a regular file open for reading. type openFile struct { f *file // the file itself offset int64 // current read offset } var ( _ io.Seeker = (*openFile)(nil) _ io.ReaderAt = (*openFile)(nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:42:51 UTC 2024 - 13.5K bytes - Viewed (0) -
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) -
src/cmd/covdata/metamerge.go
} defer inf.Close() fi, err := inf.Stat() if err != nil { fatal("accessing input meta-data file %s: %v", inpath, err) } outf, err := os.OpenFile(outpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, fi.Mode()) if err != nil { fatal("opening output meta-data file %s: %v", outpath, err) } _, err = io.Copy(outf, inf) outf.Close() if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 12 17:17:47 UTC 2024 - 12.1K bytes - Viewed (0) -
src/cmd/buildid/buildid.go
if len(newID) != len(id) { log.Fatalf("%s: build ID length mismatch %q vs %q", file, id, newID) } if len(matches) == 0 { return } f, err = os.OpenFile(file, os.O_RDWR, 0) if err != nil { log.Fatal(err) } if err := buildid.Rewrite(f, matches, newID); err != nil { log.Fatal(err) } if err := f.Close(); err != nil { log.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 1.7K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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)