Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 61 for devNull (0.11 sec)

  1. src/internal/testenv/testenv_test.go

    	mainGo := filepath.Join(dir, "main.go")
    	if err := os.WriteFile(mainGo, []byte("package main\nfunc main() {}\n"), 0644); err != nil {
    		t.Fatal(err)
    	}
    	cmd := testenv.Command(t, "go", "build", "-o", os.DevNull, mainGo)
    	out, err := cmd.CombinedOutput()
    	if err != nil {
    		t.Fatalf("%v: %v\n%s", cmd, err, out)
    	}
    }
    
    func TestMustHaveExec(t *testing.T) {
    	hasExec := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 25 23:12:44 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. src/net/splice_linux_test.go

    	// the mismatch of data size to transfer.
    	actualSize := tc.totalSize
    	if tc.limitReadSize > 0 {
    		if tc.limitReadSize < actualSize {
    			actualSize = tc.limitReadSize
    		}
    	}
    
    	f, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer f.Close()
    
    	client, server := spawnTestSocketPair(t, tc.upNet)
    	defer server.Close()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  3. src/os/file_plan9.go

    	bufp int                   // location of next record in buf.
    }
    
    func epipecheck(file *File, e error) {
    }
    
    // DevNull is the name of the operating system's “null device.”
    // On Unix-like systems, it is "/dev/null"; on Windows, "NUL".
    const DevNull = "/dev/null"
    
    // syscallMode returns the syscall-specific mode bits from Go's portable mode bits.
    func syscallMode(i FileMode) (o uint32) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 15:35:30 UTC 2024
    - 16K bytes
    - Viewed (0)
  4. src/os/exec/exec.go

    // writerDescriptor returns an os.File to which the child process
    // can write to send data to w.
    //
    // If w is nil, writerDescriptor returns a File that writes to os.DevNull.
    func (c *Cmd) writerDescriptor(w io.Writer) (*os.File, error) {
    	if w == nil {
    		f, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
    		if err != nil {
    			return nil, err
    		}
    		c.childIOFiles = append(c.childIOFiles, f)
    		return f, nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  5. src/cmd/doc/dirs.go

    			list = append(list,
    				Dir{dir: filepath.Join(buildCtx.GOROOT, "src"), inModule: true},
    				Dir{importPath: "cmd", dir: filepath.Join(buildCtx.GOROOT, "src", "cmd"), inModule: true})
    		}
    
    		if gomod == os.DevNull {
    			// Modules are enabled, but the working directory is outside any module.
    			// We can still access std, cmd, and packages specified as source files
    			// on the command line, but there are no module roots.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 17:49:12 UTC 2022
    - 9K bytes
    - Viewed (0)
  6. cmd/peer-rest-server.go

    		}
    	}
    }
    
    // DevNull - everything goes to io.Discard
    func (s *peerRESTServer) DevNull(w http.ResponseWriter, r *http.Request) {
    	if !s.IsValid(w, r) {
    		s.writeErrorResponse(w, errors.New("invalid request"))
    		return
    	}
    
    	globalNetPerfRX.Connect()
    	defer globalNetPerfRX.Disconnect()
    
    	connectTime := time.Now()
    	ctx := newContext(r, w, "DevNull")
    	for {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  7. cmd/perf-tests.go

    			continue
    		}
    		go func(index int) {
    			for i := 0; i < connectionsPerPeer; i++ {
    				wg.Add(1)
    				go func() {
    					defer wg.Done()
    					err := globalNotificationSys.peerClients[index].DevNull(ctx, r)
    					if err != nil {
    						errStr = fmt.Sprintf("error with %s: %s", globalNotificationSys.peerClients[index].String(), err.Error())
    					}
    				}()
    			}
    		}(index)
    	}
    
    	time.Sleep(duration)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. cmd/peer-rest-client.go

    	if err != nil || resp == nil {
    		return DailyAllTierStats{}, err
    	}
    	return *resp, nil
    }
    
    // DevNull - Used by netperf to pump data to peer
    func (client *peerRESTClient) DevNull(ctx context.Context, r io.Reader) error {
    	respBody, err := client.callWithContext(ctx, peerRESTMethodDevNull, nil, r, -1)
    	if err != nil {
    		return err
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  9. configure.py

      """Get the python site package paths."""
      python_paths = []
      if environ_cp.get('PYTHONPATH'):
        python_paths = environ_cp.get('PYTHONPATH').split(':')
      try:
        stderr = open(os.devnull, 'wb')
        library_paths = run_shell([
            python_bin_path, '-c',
            'import site; print("\\n".join(site.getsitepackages()))'
        ],
                                  stderr=stderr).split('\n')
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 10 04:32:44 UTC 2024
    - 53.8K bytes
    - Viewed (0)
  10. cmd/admin-handlers-site-replication.go

    		return
    	}
    	writeSuccessResponseJSON(w, body)
    }
    
    // SiteReplicationDevNull - everything goes to io.Discard
    // [POST] /minio/admin/v3/site-replication/devnull
    func (a adminAPIHandlers) SiteReplicationDevNull(w http.ResponseWriter, r *http.Request) {
    	ctx := r.Context()
    
    	globalSiteNetPerfRX.Connect()
    	defer globalSiteNetPerfRX.Disconnect()
    
    	connectTime := time.Now()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 19.4K bytes
    - Viewed (0)
Back to top