package signal
import "github.com/dotcloud/docker/pkg/signal"
Index ¶
- Variables
- func CatchAll(sigc chan os.Signal)
- func StopCatch(sigc chan os.Signal)
- func Trap(cleanup func())
Variables ¶
Functions ¶
func CatchAll ¶
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 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_unsupported.go trap.go
- Version
- v1.3.3
- Published
- Dec 11, 2014
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 1 second ago –
Tools for package owners.