Browse Source

Redirect standard out and standard error of the child program

Wirecog 7 years ago
parent
commit
ca36ecfbb2
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      kick.go

+ 2
- 0
kick.go View File

34
 
34
 
35
 	cmd := exec.Command("go", "run", appPath+"/"+mainSourceFile)
35
 	cmd := exec.Command("go", "run", appPath+"/"+mainSourceFile)
36
 	cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
36
 	cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
37
+	cmd.Stdout = os.Stdout
38
+	cmd.Stderr = os.Stderr
37
 	cmd.Start()
39
 	cmd.Start()
38
 	return cmd
40
 	return cmd
39
 
41