mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
proc: bugfix: status does not work with programs containing spaces
/proc/pid/stat needs more complex parsing Fixes #239
This commit is contained in:
@ -272,7 +272,7 @@ func (dbp *Process) trapWait(pid int) (*Thread, error) {
|
||||
|
||||
switch port {
|
||||
case dbp.os.notificationPort:
|
||||
_, status, err := wait(dbp.Pid, dbp.Pid, 0)
|
||||
_, status, err := dbp.wait(dbp.Pid, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -318,7 +318,10 @@ func (dbp *Process) trapWait(pid int) (*Thread, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func wait(pid, tgid, options int) (int, *sys.WaitStatus, error) {
|
||||
func (dbp *Process) loadProcessInformation(wg *sync.WaitGroup) {
|
||||
}
|
||||
|
||||
func (dbp *Process) wait(pid, options int) (int, *sys.WaitStatus, error) {
|
||||
var status sys.WaitStatus
|
||||
wpid, err := sys.Wait4(pid, &status, options, nil)
|
||||
return wpid, &status, err
|
||||
|
||||
Reference in New Issue
Block a user