signal: Fix leak

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2015-07-27 13:01:05 -04:00
parent 6c86daa6c9
commit 9d281a503e
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ func (h *signalHandler) reap() (exits []exit, err error) {
}
return nil, err
}
if pid <= 0 {
return exits, nil
}
exits = append(exits, exit{
pid: pid,
status: utils.ExitStatus(ws),