package signal

import "github.com/docker/docker/pkg/signal"

Index

Constants

const SIGCHLD = syscall.SIGCHLD

Signals used in api/client (no windows equivalent, use invalid signals so they don't get handled)

const SIGWINCH = syscall.SIGWINCH

Variables

var SignalMap = map[string]syscall.Signal{}

Functions

func CatchAll

func CatchAll(sigc chan os.Signal)

func StopCatch

func StopCatch(sigc chan os.Signal)

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 repeated 3 times before cleanup is complete, then cleanup is skipped and the process terminated directly. * If "DEBUG" is set in the environment, SIGQUIT causes an exit without cleanup.

Source Files

signal.go signal_unix.go signal_unsupported.go trap.go

Version
v1.5.0-rc4
Published
Feb 4, 2015
Platform
js/wasm
Imports
5 packages
Last checked
3 minutes ago

Tools for package owners.