Skip to content
/ gosup Public

Simply manage the start, stop and output of multiple processes through os/exec

License

Notifications You must be signed in to change notification settings

zaigie/gosup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gosup

Simply manage the start, stop and output of multiple processes through os/exec

Quick Start

func main() {
    pm := gosup.NewManager()
    defer pm.KillAll()

    wd, _ := os.Getwd()
    scriptPath := filepath.Join(wd, "test/run.py")

    p1, err := pm.Start("python", []string{"-u", scriptPath}, nil, nil)
    if err != nil {
        fmt.Println(err)
        return
    }

    time.Sleep(8 * time.Second)
    pm.Stop(p1)
    pm.WaitAll()
}

Process Manage

(Wait for completion)

Process Hook

(Wait for completion)

About

Simply manage the start, stop and output of multiple processes through os/exec

Resources

License

Stars

Watchers

Forks

Packages

No packages published