MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / RunCommand

Function RunCommand

user/util/helper.go:442–459  ·  view source on GitHub ↗
(executable string, args ...string)

Source from the content-addressed store, hash-verified

440)
441
442func RunCommand(executable string, args ...string) (string, error) {
443 cmd := exec.Command(executable, args...)
444 stdout, err := cmd.StdoutPipe()
445 if err != nil {
446 return "", err
447 }
448 if err := cmd.Start(); err != nil {
449 return "", err
450 }
451 bytes, err := ioutil.ReadAll(stdout)
452 if err != nil {
453 return "", err
454 }
455 if err := cmd.Wait(); err != nil {
456 return "", err
457 }
458 return strings.TrimSpace(string(bytes)), nil
459}
460
461func SaveMaps(pid_list []uint32) error {
462 for _, pid := range pid_list {

Callers 4

addLibPathFunction · 0.92
DumpSymbolRetFunction · 0.92
FindPidByNameFunction · 0.92
FindUidByPidMethod · 0.85

Calls 1

StartMethod · 0.65

Tested by

no test coverage detected