moby--moby/container
Sebastiaan van Stijn e53f65a916
pkg/signal: remove DefaultStopSignal const
This const was previously living in pkg/signal, but with that package
being moved to its own module, it didn't make much sense to put docker's
defaults in a generic module.

The const from the "signal" package is currenlty used *both* by the CLI
and the daemon as a default value when creating containers. This put up
some questions:

a. should the default be non-exported, and private to the container
   package? After all, it's a _default_ (so should be used if _NOT_ set).
b. should the client actually setting a default, or instead just omit
   the value, unless specified by the user? having the client set a
   default also means that the daemon cannot change the default value
   because the client (or older clients) will override it.
c. consider defaults from the client and defaults of the daemon to be
   separate things, and create a default const in the CLI.

This patch implements option "a" (option "b" will be done separately,
as it involves the CLI code). This still leaves "c" open as an option,
if the CLI wants to set its own default.

Unfortunately, this change means we'll have to drop the alias for the
deprecated pkg/signal.DefaultStopSignal const, but a comment was left
instead, which can assist consumers of the const to find why it's no
longer there (a search showed the Docker CLI as the only consumer though).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-11 10:31:29 +02:00
..
stream remove uses of deprecated pkg/term 2020-04-21 16:29:27 +02:00
archive.go container.BaseFS: check for nil before deref 2018-03-13 21:24:48 -07:00
container.go pkg/signal: remove DefaultStopSignal const 2021-08-11 10:31:29 +02:00
container_unit_test.go pkg/signal: remove DefaultStopSignal const 2021-08-11 10:31:29 +02:00
container_unix.go pkg/signal: remove DefaultStopSignal const 2021-08-11 10:31:29 +02:00
container_windows.go pkg/signal: remove DefaultStopSignal const 2021-08-11 10:31:29 +02:00
env.go Use strings.Index instead of strings.Split 2020-04-24 11:10:13 -07:00
env_test.go Use strings.Index instead of strings.Split 2020-04-24 11:10:13 -07:00
health.go Avoid a data race in container/health.go 2019-07-31 13:17:32 -07:00
history.go Add canonical import comment 2018-02-05 16:51:57 -05:00
memory_store.go Add canonical import comment 2018-02-05 16:51:57 -05:00
memory_store_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
monitor.go Make sure timers are stopped after use. 2019-01-16 14:32:53 -08:00
mounts_unix.go mount: add BindOptions.NonRecursive (API v1.40) 2018-11-06 17:51:58 +09:00
mounts_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
state.go goimports: fix imports 2019-09-18 12:56:54 +02:00
state_test.go cleanup: remove SetDead function 2019-08-25 20:34:30 +08:00
store.go Add canonical import comment 2018-02-05 16:51:57 -05:00
view.go goimports: fix imports 2019-09-18 12:56:54 +02:00
view_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00