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,6 +34,8 @@ func start() *exec.Cmd {
34 34
 
35 35
 	cmd := exec.Command("go", "run", appPath+"/"+mainSourceFile)
36 36
 	cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
37
+	cmd.Stdout = os.Stdout
38
+	cmd.Stderr = os.Stderr
37 39
 	cmd.Start()
38 40
 	return cmd
39 41