package signal
import "github.com/dotcloud/docker/pkg/signal"
Index ¶
- Constants
- Variables
- func CatchAll(sigc chan os.Signal)
- func DumpStacks()
- func StopCatch(sigc chan os.Signal)
- func Trap(cleanup func())
Constants ¶
Signals used in api/client (no windows equivalent, use invalid signals so they don't get handled)
Variables ¶
Functions ¶
func CatchAll ¶
func DumpStacks ¶
func DumpStacks()
func StopCatch ¶
func Trap ¶
func Trap(cleanup func())
Trap sets up a simplified signal "trap", appropriate for common behavior expected from a vanilla unix command-line tool in general (and the Docker engine in particular).
- If SIGINT or SIGTERM are received, `cleanup` is called, then the process is terminated.
- If SIGINT or SIGTERM are received 3 times before cleanup is complete, then cleanup is skipped and the process is terminated immediately (allows force quit of stuck daemon)
- A SIGQUIT always causes an exit without cleanup, with a goroutine dump preceding exit.
Source Files ¶
signal.go signal_unix.go signal_unsupported.go trap.go
- Version
- v1.7.0-rc3
- Published
- Jun 12, 2015
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 1 minute ago –
Tools for package owners.