The Go process is running. I want
- unload stack trace for each of its programs
- from the outside, regardless of what I add to its source code
- without killing him.
How can i do this?
It should be easy - a function was requested: https://code.google.com/p/go/issues/detail?id=2516 and, according to the conclusion of this thread, it is implemented. That was over two years ago. But neither the problem branch nor the commit contain hints on how to call this function.
A function request referred to SIGQUIT as a signal that the JVM receives to invoke the corresponding function. But SIGQUIT is not the answer; at least on go1.2 SIGQUIT executes # 1 and # 2, but also kills the process.
Someone asked a related question here a while ago: How to dump dumps from the goroutine stack? but they clearly did not ask for No. 2 or No. 3, none of the answers matches No. 2, and they accepted an answer that does not correspond to No. 2. So this is another question.
go
Greg Price
source share