Skip to content

Commit

Permalink
Merge pull request #1729 from mtaufen/fix-journalctl-leak
Browse files Browse the repository at this point in the history
Fix journalctl leak
  • Loading branch information
dashpole authored Aug 23, 2017
2 parents 48f6b99 + 3190c1c commit d937b68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/oomparser/oomparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"path"
"regexp"
"strconv"
"syscall"
"time"

"github.com/google/cadvisor/utils"
Expand Down Expand Up @@ -167,6 +168,9 @@ func (self *OomParser) StreamOoms(outStream chan *OomInstance) {

func callJournalctl() (io.ReadCloser, error) {
cmd := exec.Command("journalctl", "-k", "-f")
cmd.SysProcAttr = &syscall.SysProcAttr{
Pdeathsig: syscall.SIGKILL,
}
readcloser, err := cmd.StdoutPipe()
if err != nil {
return nil, err
Expand Down

0 comments on commit d937b68

Please sign in to comment.