You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"syscall"
|
|
"time"
|
|
|
|
"github.com/codeskyblue/kexec"
|
|
)
|
|
|
|
func main() {
|
|
p := kexec.CommandString("python flask_main.py")
|
|
p.Start()
|
|
time.Sleep(3 * time.Second)
|
|
err := p.Terminate(syscall.SIGKILL)
|
|
if err != nil {
|
|
log.Println(err)
|
|
}
|
|
}
|