Fix: Improve handling of soft signals on darwin

Fixes a bug on OSX where, if the debugged process spawned a child, when
that process received a SIGCHLD it would cause Delve to hang.

Fixes #197
This commit is contained in:
Derek Parker
2015-08-11 19:12:37 -05:00
parent 3f4476da02
commit a336c92a8b
5 changed files with 82 additions and 33 deletions

25
_fixtures/sigchldprog.go Normal file
View File

@ -0,0 +1,25 @@
package main
import (
"bufio"
"fmt"
"log"
"os/exec"
)
func main() {
cmd := exec.Command("date")
reader, err := cmd.StdoutPipe()
if err != nil {
log.Fatalln(err)
}
scanner := bufio.NewScanner(reader)
go func() {
for scanner.Scan() {
fmt.Println(scanner.Text())
}
reader.Close()
}()
cmd.Start()
cmd.Wait()
}