mirror of https://github.com/perkeep/perkeep.git
cmd/pk-mount: in debug mode, dump stacks on SIGQUIT
Change-Id: I70737247bf29063a7061c330960b7657213266cb
This commit is contained in:
parent
f636f75b75
commit
c5c5270dd0
|
@ -256,6 +256,11 @@ func awaitQuitKey(done chan<- bool) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if buf[0] == 'q' {
|
if buf[0] == 'q' {
|
||||||
|
if *debug {
|
||||||
|
stacks := make([]byte, 1<<20)
|
||||||
|
stacks = stacks[:runtime.Stack(stacks, true)]
|
||||||
|
os.Stderr.Write(stacks)
|
||||||
|
}
|
||||||
done <- true
|
done <- true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue