Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for kill (0.06 sec)

  1. src/os/exec_plan9.go

    // on all systems are Interrupt (send the process an interrupt) and
    // Kill (force the process to exit). Interrupt is not implemented on
    // Windows; using it with [os.Process.Signal] will return an error.
    var (
    	Interrupt Signal = syscall.Note("interrupt")
    	Kill      Signal = syscall.Note("kill")
    )
    
    func startProcess(name string, argv []string, attr *ProcAttr) (p *Process, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. src/os/pidfd_linux_test.go

    	}
    
    	// Check that all Process' public methods work as expected with
    	// "done" Process.
    	if err := proc.Kill(); err != os.ErrProcessDone {
    		t.Errorf("Kill: got %v, want %v", err, os.ErrProcessDone)
    	}
    	if err := proc.Signal(os.Kill); err != os.ErrProcessDone {
    		t.Errorf("Signal: got %v, want %v", err, os.ErrProcessDone)
    	}
    	if _, err := proc.Wait(); !errors.Is(err, syscall.ECHILD) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. src/os/exec_posix.go

    // systems are os.Interrupt (send the process an interrupt) and os.Kill (force
    // the process to exit). On Windows, sending os.Interrupt to a process with
    // os.Process.Signal is not implemented; it will return an error instead of
    // sending a signal.
    var (
    	Interrupt Signal = syscall.SIGINT
    	Kill      Signal = syscall.SIGKILL
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  4. src/os/exec_unix_test.go

    	testenv.MustHaveGoBuild(t)
    	t.Parallel()
    
    	p, err := StartProcess(testenv.GoToolPath(t), []string{"go"}, &ProcAttr{})
    	if err != nil {
    		t.Fatalf("starting test process: %v", err)
    	}
    	p.Wait()
    	if got := p.Signal(Kill); got != ErrProcessDone {
    		t.Errorf("got %v want %v", got, ErrProcessDone)
    	}
    }
    
    // Lookup of a process that does not exist at time of lookup.
    func TestProcessAlreadyDone(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 2K bytes
    - Viewed (0)
  5. src/os/exec.go

    	//
    	// On Windows, calling Release a second time returns EINVAL.
    	return p.release()
    }
    
    // Kill causes the [Process] to exit immediately. Kill does not wait until
    // the Process has actually exited. This only kills the Process itself,
    // not any other processes it may have started.
    func (p *Process) Kill() error {
    	return p.kill()
    }
    
    // Wait waits for the [Process] to exit, and then returns a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  6. pkg/kubelet/kuberuntime/kuberuntime_manager_test.go

    	// GetPodStatus and the following SyncPod will not return errors in the
    	// case where the pod has been deleted. We are not adding any pods into
    	// the fakePodProvider so they are 'deleted'.
    	podStatus, err := m.GetPodStatus(ctx, pod.UID, pod.Name, pod.Namespace)
    	assert.NoError(t, err)
    	result := m.SyncPod(context.Background(), pod, podStatus, []v1.Secret{}, backOff)
    	// This will return an error if the pod has _not_ been deleted.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 96K bytes
    - Viewed (0)
  7. src/os/exec_unix.go

    	case statusReleased:
    		return nil, syscall.EINVAL
    	}
    
    	// If we can block until Wait4 will succeed immediately, do so.
    	ready, err := p.blockUntilWaitable()
    	if err != nil {
    		return nil, err
    	}
    	if ready {
    		// Mark the process done now, before the call to Wait4,
    		// so that Process.pidSignal will not send a signal.
    		p.pidDeactivate(statusDone)
    		// Acquire a write lock on sigMu to wait for any
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. src/os/exec_windows.go

    	handle, status := p.handleTransientAcquire()
    	switch status {
    	case statusDone:
    		return ErrProcessDone
    	case statusReleased:
    		return syscall.EINVAL
    	}
    	defer p.handleTransientRelease()
    
    	if sig == Kill {
    		var terminationHandle syscall.Handle
    		e := syscall.DuplicateHandle(^syscall.Handle(0), syscall.Handle(handle), ^syscall.Handle(0), &terminationHandle, syscall.PROCESS_TERMINATE, false, 0)
    		if e != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 5K bytes
    - Viewed (0)
  9. src/os/pidfd_linux.go

    	}
    	return h, nil
    }
    
    // _P_PIDFD is used as idtype argument to waitid syscall.
    const _P_PIDFD = 3
    
    func (p *Process) pidfdWait() (*ProcessState, error) {
    	// When pidfd is used, there is no wait/kill race (described in CL 23967)
    	// because the PID recycle issue doesn't exist (IOW, pidfd, unlike PID,
    	// is guaranteed to refer to one particular process). Thus, there is no
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  10. pkg/kubelet/kubelet.go

    	plegChannelCapacity = 1000
    
    	// Generic PLEG relies on relisting for discovering container events.
    	// A longer period means that kubelet will take longer to detect container
    	// changes and to update pod status. On the other hand, a shorter period
    	// will cause more frequent relisting (e.g., container runtime operations),
    	// leading to higher cpu usage.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 126.1K bytes
    - Viewed (0)
Back to top