Skip to content

Commit

Permalink
Merge pull request #4321 from bparees/sigquit
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed Aug 22, 2015
2 parents 2424366 + 198f501 commit a5166f7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkg/cmd/infra/builder/builder.go
@@ -1,6 +1,12 @@
package builder

import (
"os"
"os/signal"
"runtime"
"syscall"

"github.com/golang/glog"
"github.com/spf13/cobra"

"github.com/openshift/origin/pkg/build/builder/cmd"
Expand Down Expand Up @@ -28,6 +34,18 @@ func NewCommandSTIBuilder(name string) *cobra.Command {
Short: "Run a Source-to-Images build",
Long: stiBuilderLong,
Run: func(c *cobra.Command, args []string) {
go func() {
for {
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGQUIT)
buf := make([]byte, 1<<20)
for {
<-sigs
runtime.Stack(buf, true)
glog.Infof("=== received SIGQUIT ===\n*** goroutine dump...\n%s\n*** end\n", buf)
}
}
}()
cmd.RunSTIBuild()
},
}
Expand Down

0 comments on commit a5166f7

Please sign in to comment.