Skip to content

Commit 5f74ee9

Browse files
committed
try to fix zombies
1 parent 8621698 commit 5f74ee9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

cmd/api.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,9 @@ func Exec(L *lua.LState) int {
3737
cmd.Stderr = &stderr
3838
cmd.Stdout = &stdout
3939

40-
if err := cmd.Start(); err != nil {
41-
L.Push(lua.LNil)
42-
L.Push(lua.LString(err.Error()))
43-
return 2
44-
}
45-
4640
done := make(chan error)
4741
go func() {
48-
done <- cmd.Wait()
42+
done <- cmd.Run()
4943
}()
5044

5145
select {

0 commit comments

Comments
 (0)