mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 20:23:41 +08:00
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:
25
_fixtures/sigchldprog.go
Normal file
25
_fixtures/sigchldprog.go
Normal 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()
|
||||
}
|
||||
Reference in New Issue
Block a user