Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for npipe (0.04 sec)

  1. pkg/kubelet/util/util_windows.go

    limitations under the License.
    */
    
    package util
    
    import (
    	"fmt"
    	"path/filepath"
    	"strings"
    	"syscall"
    	"time"
    )
    
    const npipeProtocol = "npipe"
    
    // LocalEndpoint returns the full path to a named pipe at the given endpoint - unlike on unix, we can't use sockets.
    func LocalEndpoint(path, file string) (string, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 08:58:18 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. pkg/kubelet/util/util_windows_test.go

    	}{
    		{
    			path:             "/var/lib/kubelet/pod-resources",
    			file:             "kube.sock", // this is not the default, but it's not relevant here
    			expectError:      false,
    			expectedFullPath: `npipe://\\.\pipe\kubelet-pod-resources`,
    		},
    	}
    	for _, test := range tests {
    		fullPath, err := LocalEndpoint(test.path, test.file)
    		if test.expectError {
    			assert.NotNil(t, err, "expected error")
    			continue
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 08:58:18 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  3. src/internal/trace/testdata/testprog/wait-on-pipe.go

    import (
    	"log"
    	"os"
    	"runtime/trace"
    	"syscall"
    	"time"
    )
    
    func main() {
    	// Create a pipe to block on.
    	var p [2]int
    	if err := syscall.Pipe(p[:]); err != nil {
    		log.Fatalf("failed to create pipe: %v", err)
    	}
    	rfd, wfd := p[0], p[1]
    
    	// Create a goroutine that blocks on the pipe.
    	done := make(chan struct{})
    	go func() {
    		var data [1]byte
    		_, err := syscall.Read(rfd, data[:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  4. 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)
  5. src/os/exec_test.go

    	testenv.MustHaveGoBuild(t)
    	t.Parallel()
    
    	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},
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  6. pkg/kubelet/kubelet_pods_windows_test.go

    			ContainerPath:  `c:/mnt/path7`,
    			HostPath:       `c:\mnt\disk7`,
    			ReadOnly:       false,
    			SELinuxRelabel: false,
    		},
    		{
    			Name:           "pipe1",
    			ContainerPath:  `\\.\pipe\pipe1`,
    			HostPath:       `\\.\pipe\pipe1`,
    			ReadOnly:       false,
    			SELinuxRelabel: false,
    		},
    		{
    			Name:           "k8s-managed-etc-hosts",
    			ContainerPath:  `C:\Windows\System32\drivers\etc\hosts`,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. src/runtime/debug/example_monitor_test.go

    	cmd := exec.Command(exe, "-test.run=ExampleSetCrashOutput_monitor")
    	cmd.Env = append(os.Environ(), monitorVar+"=1")
    	cmd.Stderr = os.Stderr
    	cmd.Stdout = os.Stderr
    	pipe, err := cmd.StdinPipe()
    	if err != nil {
    		log.Fatalf("StdinPipe: %v", err)
    	}
    	debug.SetCrashOutput(pipe.(*os.File), debug.CrashOptions{}) // (this conversion is safe)
    	if err := cmd.Start(); err != nil {
    		log.Fatalf("can't start monitor: %v", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  8. pkg/util/filesystem/util_windows_test.go

    		for i := range b {
    			b[i] = letter[rand.Intn(len(letter))]
    		}
    		return "\\\\.\\pipe\\test-pipe" + string(b)
    	}
    	testFile := generatePipeName(4)
    	pipeln, err := winio.ListenPipe(testFile, &winio.PipeConfig{SecurityDescriptor: "D:P(A;;GA;;;BA)(A;;GA;;;SY)"})
    	defer pipeln.Close()
    
    	require.NoErrorf(t, err, "Failed to listen on named pipe for test purposes: %v", err)
    	result, err := IsUnixDomainSocket(testFile)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 09:10:26 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  9. src/internal/trace/testdata/testprog/stress-start-stop.go

    			outerDone <- true
    		}()
    
    		var wg sync.WaitGroup
    		done := make(chan bool)
    
    		wg.Add(1)
    		go func() {
    			<-done
    			wg.Done()
    		}()
    
    		rp, wp, err := os.Pipe()
    		if err != nil {
    			log.Fatalf("failed to create pipe: %v", err)
    			return
    		}
    		defer func() {
    			rp.Close()
    			wp.Close()
    		}()
    		wg.Add(1)
    		go func() {
    			var tmp [1]byte
    			rp.Read(tmp[:])
    			<-done
    			wg.Done()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  10. cmd/bitrot-streaming.go

    	// Race condition is because of io.PipeWriter implementation. i.e consider the following
    	// sequent of operations:
    	// 1) pipe.Write()
    	// 2) pipe.Close()
    	// Now pipe.Close() can return before the data is read on the other end of the pipe and written to the disk
    	// Hence an immediate Read() on the file can return incorrect data.
    	if b.canClose != nil {
    		b.canClose.Wait()
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top