surma / stacksignal

Make a go program print a stacktrace of all goroutines on SIGUSR1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stacksignal registers a signal handler for SIGUSR1. Whenever the importing program receives SIGUSR1, a full stacktrace of all goroutines will be printed to stderr.

Since there are no functions to use, the import line should be:

import _ "github.com/surma/stacksignal"

Version 1.1.1

About

Make a go program print a stacktrace of all goroutines on SIGUSR1

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%