Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for findProcess (1.08 sec)

  1. src/os/exec.go

    // Getppid returns the process id of the caller's parent.
    func Getppid() int { return syscall.Getppid() }
    
    // FindProcess looks for a running process by its pid.
    //
    // The [Process] it returns can be used to obtain information
    // about the underlying operating system process.
    //
    // On Unix systems, FindProcess always succeeds and returns a Process
    // for the given pid, regardless of whether the process exists. To test whether
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  2. pilot/cmd/pilot-agent/status/server.go

    		return
    	}
    	_, err = w.Write(b)
    	if err != nil {
    		w.WriteHeader(http.StatusInternalServerError)
    	}
    }
    
    // notifyExit sends SIGTERM to itself
    func notifyExit() {
    	p, err := os.FindProcess(os.Getpid())
    	if err != nil {
    		log.Error(err)
    	}
    	if err := p.Signal(syscall.SIGTERM); err != nil {
    		log.Errorf("failed to send SIGTERM to self: %v", err)
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 31.1K bytes
    - Viewed (1)
Back to top