1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

22 commits

Author SHA1 Message Date
Dan Walsh
d1ae13b0b0 Define all of the signals defined by kill -l
1) SIGHUP	 2) SIGINT	 3) SIGQUIT	 4) SIGILL	 5) SIGTRAP
 6) SIGABRT	 7) SIGBUS	 8) SIGFPE	 9) SIGKILL	10) SIGUSR1
11) SIGSEGV	12) SIGUSR2	13) SIGPIPE	14) SIGALRM	15) SIGTERM
16) SIGSTKFLT	17) SIGCHLD	18) SIGCONT	19) SIGSTOP	20) SIGTSTP
21) SIGTTIN	22) SIGTTOU	23) SIGURG	24) SIGXCPU	25) SIGXFSZ
26) SIGVTALRM	27) SIGPROF	28) SIGWINCH	29) SIGIO	30) SIGPWR
31) SIGSYS	34) SIGRTMIN	35) SIGRTMIN+1	36) SIGRTMIN+2	37) SIGRTMIN+3
38) SIGRTMIN+4	39) SIGRTMIN+5	40) SIGRTMIN+6	41) SIGRTMIN+7	42) SIGRTMIN+8
43) SIGRTMIN+9	44) SIGRTMIN+10	45) SIGRTMIN+11	46) SIGRTMIN+12	47) SIGRTMIN+13
48) SIGRTMIN+14	49) SIGRTMIN+15	50) SIGRTMAX-14	51) SIGRTMAX-13	52) SIGRTMAX-12
53) SIGRTMAX-11	54) SIGRTMAX-10	55) SIGRTMAX-9	56) SIGRTMAX-8	57) SIGRTMAX-7
58) SIGRTMAX-6	59) SIGRTMAX-5	60) SIGRTMAX-4	61) SIGRTMAX-3	62) SIGRTMAX-2
63) SIGRTMAX-1	64) SIGRTMAX

This will allow users to specify signals by name.  Needed to make docker run --stop-signal
work as defined by systemd.

man systemd

defines the proper way to shutdown a systemd running as pid 1 in a container as

SIGRTMIN+4

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2015-11-12 09:55:18 -05:00
John Howard
bc503ca8ab Windows: [TP4] docker kill handling
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-13 16:04:49 -07:00
John Howard
2dca1bc633 Windows: Enable kill (part one)
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-13 08:42:47 -07:00
David Calavera
0e50d946a2 Signal to stop a container.
Allow to set the signal to stop a container in `docker run`:
- Use `--stop-signal` with docker-run to set the default signal the container will use to exit.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-10 19:56:05 -04:00
Cezar Sa Espinola
e787296c75 Ensure goroutines dump is not truncated
Calling runtime.Stack requires the buffer to be big enough to fit the
goroutines dump. If it's not big enough the dump will be truncated and
the value returned will be the same size as the buffer.

The code was changed to handle this situation and try again with a
bigger buffer. Each time the dump doesn't fit in the buffer its size is
doubled.

Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
2015-09-04 14:50:37 -03:00
Vincent Demeester
18c7c67308 Lint on pkg/* packages
- pkg/useragent
- pkg/units
- pkg/ulimit
- pkg/truncindex
- pkg/timeoutconn
- pkg/term
- pkg/tarsum
- pkg/tailfile
- pkg/systemd
- pkg/stringutils
- pkg/stringid
- pkg/streamformatter
- pkg/sockets
- pkg/signal
- pkg/proxy
- pkg/progressreader
- pkg/pools
- pkg/plugins
- pkg/pidfile
- pkg/parsers
- pkg/parsers/filters
- pkg/parsers/kernel
- pkg/parsers/operatingsystem

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-27 21:26:21 +02:00
Phil Estes
95fcf76cc6 Add SIGUSR1 handler for dumping stack/goroutine traces
Add handler for SIGUSR1 based on feedback regarding when to dump
goroutine stacks.  This will also dump goroutine stack traces on SIGQUIT
followed by a hard-exit from the daemon.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-05-12 10:09:23 +10:00
Antonio Murdaca
6f4d847046 Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
VladimirAus
9b876b9c03 #11585: README for pkg/signal. Signed-off-by: Vladimir Roudakov <v_roudakov@yahoo.com>
Signed-off-by: VladimirAus <v_roudakov@yahoo.com>
2015-03-26 21:18:27 +10:00
Erik Dubbelboer
46b1194d99 Removed race condition
If two interrupts were fired really quickly interruptCount could have been incremented twice before the LoadUint32 making cleanup not being called at all.

Signed-off-by: Erik Dubbelboer <erik@dubbelboer.com>
2014-12-06 22:52:19 +08:00
Ahmet Alp Balkan
91a86670aa Extract client signals to pkg/signal
SIGCHLD and SIGWINCH used in api/client (cli code) are not
available on Windows. Extracting into separate files with build
tags.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2014-11-14 18:20:53 -08:00
Alexandr Morozov
7c62cee51e Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:06 -07:00
Vincent Batts
92df943fbf daemon logging: unifying output and timestamps
A little refactor of the ./pkg/log so engine can have a logger instance

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-26 14:44:46 -04:00
Michael Crosby
cdf8a55670 Exit after receiving SIGTERM
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-13 12:18:23 -07:00
Solomon Hykes
d55e3fea72 Move signal handling code to pkg/signal.Trap
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:56:11 +00:00
Solomon Hykes
41d437117d Guillaume is busy full-time on his new business, and no longer available
as a maintainer.

Best of luck on your e-commerce business Guillaume, and thanks for all
the great contributions!

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-06-16 06:22:15 -07:00
Tianon Gravi
defecac279 Fix various MAINTAINERS format inconsistencies
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-04-30 11:22:11 -06:00
Guillaume J. Charmes
915d967f55
Update email + add self to pkg/signal
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-10 20:26:45 -07:00
Kato Kazuyoshi
b2cd89056f Like signal_linux.go, we don't have import os and os/signal
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
2014-03-11 23:14:58 +09:00
Guillaume J. Charmes
157f24ca77 Make docker use the signal pkg with strings
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-10 17:36:47 -07:00
Guillaume J. Charmes
10dc16dcd3 Create portable signalMap
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-10 17:36:41 -07:00
Guillaume J. Charmes
c563262239 Move signal to pkg
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-10 17:36:32 -07:00