会话关闭时生成golang进程的堆栈跟踪

How to generate stack trace in golang process when the session which started the process is closed.

I have tried SIGQUIT. It generates the stack trace and prints it on stdout. However, its not helpful when the session which started the process is closed. Is there any other way of doing it?