Pull request: upd-fmt
Merge in DNS/adguard-home from upd-fmt to master Squashed commit of the following: commit 73d9a71feccd8256841ae5a01e4a6aae0bcb2f65 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Aug 31 18:37:39 2022 +0300 all: upd fmt
This commit is contained in:
@@ -121,13 +121,12 @@ func PIDByCommand(command string, except ...int) (pid int, err error) {
|
||||
}
|
||||
|
||||
// parsePSOutput scans the output of ps searching the largest PID of the process
|
||||
// associated with cmdName ignoring PIDs from ignore. A valid line from
|
||||
// r should look like these:
|
||||
//
|
||||
// 123 ./example-cmd
|
||||
// 1230 some/base/path/example-cmd
|
||||
// 3210 example-cmd
|
||||
// associated with cmdName ignoring PIDs from ignore. A valid line from r
|
||||
// should look like these:
|
||||
//
|
||||
// 123 ./example-cmd
|
||||
// 1230 some/base/path/example-cmd
|
||||
// 3210 example-cmd
|
||||
func parsePSOutput(r io.Reader, cmdName string, ignore []int) (largest, instNum int, err error) {
|
||||
s := bufio.NewScanner(r)
|
||||
for s.Scan() {
|
||||
|
||||
Reference in New Issue
Block a user