- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 466 for pipe1 (0.05 sec)
-
src/io/pipe_test.go
} if err = r.Close(); err != nil { t.Errorf("r.Close: %v", err) } } } // Test close on Read side during Read. func TestPipeReadClose2(t *testing.T) { c := make(chan int, 1) r, _ := Pipe() go delayClose(t, r, c, pipeTest{}) n, err := r.Read(make([]byte, 64)) <-c if n != 0 || err != ErrClosedPipe {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 9K bytes - Viewed (0) -
src/cmd/go/terminal_test.go
// invocation (rather than, e.g., putting a pipe in the way). // // See issue 18153. testenv.MustHaveGoBuild(t) // Start with a "self test" to make sure that if we *don't* pass in a // terminal, the test can correctly detect that. (cmd/go doesn't guarantee // that it won't add a terminal in the middle, but that would be pretty weird.) t.Run("pipe", func(t *testing.T) { r, w, err := os.Pipe() if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 07 18:18:50 UTC 2022 - 3.3K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/testdata/libgo2/libgo2.go
#include <stdio.h> // Raise SIGPIPE. static void CRaiseSIGPIPE() { int fds[2]; if (pipe(fds) == -1) { perror("pipe"); exit(EXIT_FAILURE); } // Close the reader end close(fds[0]); // Write to the writer end to provoke a SIGPIPE if (write(fds[1], "some data", 9) != -1) { fprintf(stderr, "write to a closed pipe succeeded\n"); exit(EXIT_FAILURE); } close(fds[1]); } */ import "C" import (
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.6K bytes - Viewed (0) -
src/net/http/httputil/persist.go
func (sc *ServerConn) Read() (*http.Request, error) { var req *http.Request var err error // Ensure ordered execution of Reads and Writes id := sc.pipe.Next() sc.pipe.StartRequest(id) defer func() { sc.pipe.EndRequest(id) if req == nil { sc.pipe.StartResponse(id) sc.pipe.EndResponse(id) } else { // Remember the pipeline id of this request sc.mu.Lock() sc.pipereq[req] = id sc.mu.Unlock() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 11.1K bytes - Viewed (0) -
src/go/doc/testdata/example.go
} // capture stdout and stderr r, w, err := os.Pipe() if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } os.Stdout, os.Stderr = w, w outC := make(chan string) go func() { buf := new(bytes.Buffer) _, err := io.Copy(buf, r) if err != nil { fmt.Fprintf(stderr, "testing: copying pipe: %v\n", err) os.Exit(1) } outC <- buf.String() }()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Oct 02 02:28:27 UTC 2022 - 1.6K bytes - Viewed (0) -
src/syscall/exec_libc2.go
// Pass 1: look for fd[i] < i and move those up above len(fd) // so that pass 2 won't stomp on an fd it needs later. if pipe < nextfd { if runtime.GOOS == "openbsd" { _, _, err1 = rawSyscall(dupTrampoline, uintptr(pipe), uintptr(nextfd), O_CLOEXEC) } else { _, _, err1 = rawSyscall(dupTrampoline, uintptr(pipe), uintptr(nextfd), 0) if err1 != 0 { goto childerror }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 29 18:51:35 UTC 2023 - 8.2K bytes - Viewed (0) -
src/text/template/parse/node.go
NodeType Pos tr *Tree Line int // The line number in the input. Deprecated: Kept for compatibility. Pipe *PipeNode // The pipeline in the action. } func (t *Tree) newAction(pos Pos, line int, pipe *PipeNode) *ActionNode { return &ActionNode{tr: t, NodeType: NodeAction, Pos: pos, Line: line, Pipe: pipe} } func (a *ActionNode) String() string { var sb strings.Builder a.writeTo(&sb) return sb.String()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 24.2K bytes - Viewed (0) -
src/os/pipe_unix.go
//go:build aix || darwin package os import "syscall" // Pipe returns a connected pair of Files; reads from r return bytes written to w. // It returns the files and an error, if any. func Pipe() (r *File, w *File, err error) { var p [2]int // See ../syscall/exec.go for description of lock. syscall.ForkLock.RLock() e := syscall.Pipe(p[0:]) if e != nil { syscall.ForkLock.RUnlock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:47:23 UTC 2024 - 774 bytes - Viewed (0) -
src/testing/run_example.go
// example.go when js/wasm gets an os.Pipe implementation // and no longer needs this separation. package testing import ( "fmt" "io" "os" "strings" "time" ) func runExample(eg InternalExample) (ok bool) { if chatty.on { fmt.Printf("%s=== RUN %s\n", chatty.prefix(), eg.Name) } // Capture stdout. stdout := os.Stdout r, w, err := os.Pipe() if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 11 20:56:32 UTC 2023 - 1.3K bytes - Viewed (0) -
src/os/exec/exec_windows_test.go
func cmdPipeHandle(args ...string) { handle, _ := strconv.ParseUint(args[0], 16, 64) pipe := os.NewFile(uintptr(handle), "") _, err := fmt.Fprint(pipe, args[1]) if err != nil { fmt.Fprintf(os.Stderr, "writing to pipe failed: %v\n", err) os.Exit(1) } pipe.Close() } func TestPipePassing(t *testing.T) { t.Parallel() r, w, err := os.Pipe() if err != nil { t.Error(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 21 23:07:55 UTC 2023 - 2.4K bytes - Viewed (0)