Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 216 for emitError (0.18 sec)

  1. src/cmd/go/internal/tool/tool.go

    	}
    	if err != nil {
    		// Only print about the exit status if the command
    		// didn't even run (not an ExitError) or it didn't exit cleanly
    		// or we're printing command lines too (-x mode).
    		// Assume if command exited cleanly (even with non-zero status)
    		// it printed any messages it wanted to print.
    		if e, ok := err.(*exec.ExitError); !ok || !e.Exited() || cfg.BuildX {
    			fmt.Fprintf(os.Stderr, "go tool %s: %s\n", toolName, err)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 18:02:11 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. pkg/probe/exec/exec.go

    	e.SetStdout(writer)
    	err := e.Start()
    	if err == nil {
    		err = e.Wait()
    	}
    	data := dataBuffer.Bytes()
    
    	klog.V(4).Infof("Exec probe response: %q", string(data))
    	if err != nil {
    		exit, ok := err.(exec.ExitError)
    		if ok {
    			if exit.ExitStatus() == 0 {
    				return probe.Success, string(data), nil
    			}
    			return probe.Failure, string(data), nil
    		}
    
    		if errors.Is(err, remote.ErrCommandTimedOut) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 08:58:18 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. src/cmd/internal/objabi/path_test.go

    	testenv.MustHaveGoBuild(t)
    	goCmd, err := testenv.GoTool()
    	if err != nil {
    		t.Fatal(err)
    	}
    	pkgList, err := exec.Command(goCmd, "list", "-deps", "runtime").Output()
    	if err != nil {
    		if err, ok := err.(*exec.ExitError); ok {
    			t.Log(string(err.Stderr))
    		}
    		t.Fatal(err)
    	}
    	for _, pkg := range strings.Split(strings.TrimRight(string(pkgList), "\n"), "\n") {
    		if pkg == "unsafe" {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 13:56:25 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  4. src/cmd/internal/bootstrap_test/experiment_toolid_test.go

    func runCmd(t *testing.T, dir string, env []string, path string, args ...string) []byte {
    	cmd := exec.Command(path, args...)
    	cmd.Dir = dir
    	cmd.Env = env
    	out, err := cmd.Output()
    	if err != nil {
    		if ee := (*exec.ExitError)(nil); errors.As(err, &ee) {
    			out = append(out, ee.Stderr...)
    		}
    		t.Fatalf("%s failed:\n%s\n%s", cmd, out, err)
    	}
    	return out
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 18:47:14 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  5. src/internal/fuzz/sys_windows.go

    }
    
    func isInterruptError(err error) bool {
    	// On Windows, we can't tell whether the process was interrupted by the error
    	// returned by Wait. It looks like an ExitError with status 1.
    	return false
    }
    
    // terminationSignal returns -1 and false because Windows doesn't have signals.
    func terminationSignal(err error) (os.Signal, bool) {
    	return syscall.Signal(-1), false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:35:25 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  6. cluster/images/etcd/migrate/migrate_server.go

    			klog.Infof("etcd server has not terminated gracefully after %s, killing it.", gracefulWait)
    			r.cmd.Process.Kill()
    			return
    		}
    	}()
    	err = r.cmd.Wait()
    	close(stopped)
    	if exiterr, ok := err.(*exec.ExitError); ok {
    		klog.Infof("etcd server stopped (signal: %s)", exiterr.Error())
    		// stopped
    	} else if err != nil {
    		return fmt.Errorf("error waiting for etcd to stop: %v", err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 30 16:29:59 UTC 2022
    - 3.8K bytes
    - Viewed (0)
  7. src/os/exec/exec.go

    		// set it to nil to prevent awaitGoroutines from blocking on it.
    		c.goroutineErr = nil
    	}
    
    	resultc <- ctxResult{err: err}
    }
    
    // An ExitError reports an unsuccessful exit by a command.
    type ExitError struct {
    	*os.ProcessState
    
    	// Stderr holds a subset of the standard error output from the
    	// Cmd.Output method if standard error was not otherwise being
    	// collected.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  8. pkg/volume/csi/csi_block_test.go

    	_, err = csiMapper.SetUpDevice()
    	if err == nil {
    		t.Errorf("test should fail, but no error occurred")
    	} else if reflect.TypeOf(transientError) != reflect.TypeOf(err) {
    		t.Fatalf("expected exitError type: %v got: %v (%v)", reflect.TypeOf(transientError), reflect.TypeOf(err), err)
    	}
    }
    
    func TestBlockMapperMapPodDevice(t *testing.T) {
    	plug, tmpDir := newTestPlugin(t, nil)
    	defer os.RemoveAll(tmpDir)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 11 06:07:40 UTC 2023
    - 26.5K bytes
    - Viewed (0)
  9. src/runtime/signal_windows_test.go

    	}
    
    	// run test program in same thread
    	cmd = exec.Command(exe)
    	out, err = testenv.CleanCmdEnv(cmd).CombinedOutput()
    	if err == nil {
    		t.Fatal("error expected")
    	}
    	if _, ok := err.(*exec.ExitError); ok && len(out) > 0 {
    		if !bytes.Contains(out, []byte("Exception 0x2a")) {
    			t.Fatalf("unexpected failure while running executable: %s\n%s", err, out)
    		}
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 08:26:52 UTC 2023
    - 9K bytes
    - Viewed (0)
  10. src/cmd/go/go_unix_test.go

    	// not have to be killed with SIGKILL.
    	cancel()
    
    	io.Copy(stdout, r)
    	if stdout.Len() > 0 {
    		t.Logf("stdout:\n%s", stdout)
    	}
    	err = cmd.Wait()
    
    	ee, _ := err.(*exec.ExitError)
    	if ee == nil {
    		t.Fatalf("unexpectedly finished with nonzero status")
    	}
    	if len(ee.Stderr) > 0 {
    		t.Logf("stderr:\n%s", ee.Stderr)
    	}
    	if !ee.Exited() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 19 16:17:55 UTC 2023
    - 3.5K bytes
    - Viewed (0)
Back to top