MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / getPID

Method getPID

internal/apps/app_cmd.go:261–271  ·  view source on GitHub ↗

获取当前的PID

()

Source from the content-addressed store, hash-verified

259
260// 获取当前的PID
261func (this *AppCmd) getPID() int {
262 if !this.sock.IsListening() {
263 return 0
264 }
265
266 reply, err := this.sock.Send(&gosock.Command{Code: "pid"})
267 if err != nil {
268 return 0
269 }
270 return maps.NewMap(reply.Params).GetInt("pid")
271}
272
273// ParseOptions 分析参数中的选项
274func (this *AppCmd) ParseOptions(args []string) map[string][]string {

Callers 3

runStartMethod · 0.95
runStopMethod · 0.95
runStatusMethod · 0.95

Calls 1

SendMethod · 0.45

Tested by

no test coverage detected