Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 57 for ExitError (0.19 sec)

  1. src/os/exec/exec_windows_test.go

    	cmd := testenv.Command(t, "cmd", "/c exit 88")
    	cmd.SysProcAttr = &syscall.SysProcAttr{NoInheritHandles: true}
    	err := cmd.Run()
    	exitError, ok := err.(*exec.ExitError)
    	if !ok {
    		t.Fatalf("got error %v; want ExitError", err)
    	}
    	if exitError.ExitCode() != 88 {
    		t.Fatalf("got exit code %d; want 88", exitError.ExitCode())
    	}
    }
    
    // start a child process without the user code explicitly starting
    // with a copy of the parent's SYSTEMROOT.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 21 23:07:55 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  2. src/internal/fuzz/sys_posix.go

    // was terminated by an interrupt signal (SIGINT).
    func isInterruptError(err error) bool {
    	exitErr, ok := err.(*exec.ExitError)
    	if !ok || exitErr.ExitCode() >= 0 {
    		return false
    	}
    	status := exitErr.Sys().(syscall.WaitStatus)
    	return status.Signal() == syscall.SIGINT
    }
    
    // terminationSignal checks if err is an exec.ExitError with a signal status.
    // If it is, terminationSignal returns the signal and true.
    // If not, -1 and false.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 12 19:47:40 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  3. pkg/volume/csi/csi_metrics_test.go

    	tests := []struct {
    		name       string
    		volumeID   string
    		targetPath string
    		exitError  error
    	}{
    		{
    			name:       "volume with no driver",
    			volumeID:   "foobar",
    			targetPath: "/mnt/foo",
    			exitError:  transientError,
    		},
    	}
    
    	for _, tc := range tests {
    		metricsGetter := &metricsCsi{volumeID: tc.volumeID, targetPath: tc.targetPath}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 11 06:07:40 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  4. pkg/kubelet/kubelet_server_journal_windows.go

    		fmt.Sprintf("Get-WinEvent -ListProvider %s | Format-Table -AutoSize", service)}...)
    
    	_, err := cmd.CombinedOutput()
    	if err != nil {
    		// Get-WinEvent will return ExitError if the service is not listed as a provider
    		if _, ok := err.(*exec.ExitError); ok {
    			return false
    		}
    		// Other errors imply that CombinedOutput failed before the command was executed,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 15:54:36 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  5. src/internal/runtime/exithook/hooks.go

    		}
    	}()
    
    	for len(hooks) > 0 {
    		h := hooks[len(hooks)-1]
    		hooks = hooks[:len(hooks)-1]
    		if code != 0 && !h.RunOnFailure {
    			continue
    		}
    		h.F()
    	}
    }
    
    type exitError string
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. src/runtime/runtime-gdb_unix_test.go

    	}
    
    	err = cmd.Wait()
    	t.Logf("child output:\n%s", output.String())
    	if err == nil {
    		t.Fatalf("Wait succeeded, want SIGABRT")
    	}
    	ee, ok := err.(*exec.ExitError)
    	if !ok {
    		t.Fatalf("Wait err got %T %v, want exec.ExitError", ee, ee)
    	}
    	ws, ok := ee.Sys().(syscall.WaitStatus)
    	if !ok {
    		t.Fatalf("Sys got %T %v, want syscall.WaitStatus", ee.Sys(), ee.Sys())
    	}
    	if ws.Signal() != syscall.SIGABRT {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 17 19:05:30 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  7. src/os/exec/exec_test.go

    		// resulting error should be an exec.ExitError without additional wrapping.
    		if _, ok := err.(*exec.ExitError); !ok {
    			t.Errorf("Wait error = %v; want *exec.ExitError", err)
    		}
    	})
    
    	// If Cancel returns ErrProcessDone but the process is not actually done
    	// (and has to be killed), Wait should report the usual SIGKILL ExitError,
    	// not the error from Cancel.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 48.4K bytes
    - Viewed (0)
  8. 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)
  9. pkg/volume/csi/csi_attacher_test.go

    					if err != nil {
    						t.Errorf("failed to modify permissions after test: %v", err)
    					}
    				}
    				if tc.exitError != nil && reflect.TypeOf(tc.exitError) != reflect.TypeOf(err) {
    					t.Fatalf("expected exitError type: %v got: %v (%v)", reflect.TypeOf(tc.exitError), reflect.TypeOf(err), err)
    				}
    				return
    			}
    			if tc.shouldFail {
    				t.Errorf("test should fail, but no error occurred")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 12:23:16 UTC 2024
    - 58.1K bytes
    - Viewed (0)
  10. pkg/volume/csi/csi_mounter_test.go

    			}
    
    			// Mounter.SetUp()
    			err = csiMounter.SetUp(volume.MounterArgs{})
    			if tc.setupShouldFail {
    				if err != nil {
    					if tc.exitError != nil && reflect.TypeOf(tc.exitError) != reflect.TypeOf(err) {
    						t.Fatalf("expected exitError type: %v got: %v (%v)", reflect.TypeOf(tc.exitError), reflect.TypeOf(err), err)
    					}
    					t.Log(err)
    					return
    				} else {
    					t.Error("test should fail, but no error occurred")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 50.1K bytes
    - Viewed (0)
Back to top