<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/docker.git/cmd/dockerd/trap, branch master</title>
<subtitle>github.com: dotcloud/docker.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/'/>
<entry>
<title>cmd/dockerd/trap: log to logrus directly</title>
<updated>2023-04-26T13:53:01+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2023-04-26T13:53:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=993ca8c6de45c0761414b87c0190c1d1509d4ef8'/>
<id>993ca8c6de45c0761414b87c0190c1d1509d4ef8</id>
<content type='text'>
Logging through a dependency-injected interface value was a vestige of
when Trap was in pkg/signal to avoid importing logrus in a reusable
package: cc4da8112814cdbb00dbf23370f9ed764383de1f.
Now that Trap lives under cmd/dockerd, nobody will be importing this so
we no longer need to worry about minimizing the package's dependencies.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Logging through a dependency-injected interface value was a vestige of
when Trap was in pkg/signal to avoid importing logrus in a reusable
package: cc4da8112814cdbb00dbf23370f9ed764383de1f.
Now that Trap lives under cmd/dockerd, nobody will be importing this so
we no longer need to worry about minimizing the package's dependencies.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/dockerd/trap: don't force exit after cleanup</title>
<updated>2023-04-26T13:51:36+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2023-04-12T00:56:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=0f3c5d3893b4b86788d065776ad4d5c73a9ef553'/>
<id>0f3c5d3893b4b86788d065776ad4d5c73a9ef553</id>
<content type='text'>
Always calling os.Exit() on clean shutdown may not always be desirable
as deferred functions are not run. Let the cleanup callback decide
whether or not to call os.Exit() itself. Allow the process to exit the
normal way, by returning from func main().

Simplify the trap.Trap implementation. The signal notifications are
buffered in a channel so there is little need to spawn a new goroutine
for each received signal. With all signals being handled in the same
goroutine, there are no longer any concurrency concerns around the
interrupt counter.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Always calling os.Exit() on clean shutdown may not always be desirable
as deferred functions are not run. Let the cleanup callback decide
whether or not to call os.Exit() itself. Allow the process to exit the
normal way, by returning from func main().

Simplify the trap.Trap implementation. The signal notifications are
buffered in a channel so there is little need to spawn a new goroutine
for each received signal. With all signals being handled in the same
goroutine, there are no longer any concurrency concerns around the
interrupt counter.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/dockerd: ignore SIGPIPE using signal.Ignore</title>
<updated>2023-04-25T21:50:12+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2023-04-12T00:18:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=16d5d4b6e1e85b0e82059be6914a12374c3fc81c'/>
<id>16d5d4b6e1e85b0e82059be6914a12374c3fc81c</id>
<content type='text'>
The fix to ignore SIGPIPE signals was originally added in the Go 1.4
era. signal.Ignore was first added in Go 1.5.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fix to ignore SIGPIPE signals was originally added in the Go 1.4
era. signal.Ignore was first added in Go 1.5.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/dockerd: use default SIGQUIT behaviour</title>
<updated>2023-01-10T22:11:54+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2023-01-10T21:49:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=0867d3173c3776128aecaafcf9e8e119134f3460'/>
<id>0867d3173c3776128aecaafcf9e8e119134f3460</id>
<content type='text'>
dockerd handles SIGQUIT by dumping all goroutine stacks to standard
error and exiting. In contrast, the Go runtime's default SIGQUIT
behaviour... dumps all goroutine stacks to standard error and exits.
The default SIGQUIT behaviour is implemented directly in the runtime's
signal handler, and so is both more robust to bugs in the Go runtime and
does not perturb the state of the process to anywhere near same degree
as dumping goroutine stacks from a user goroutine. The only notable
difference from a user's perspective is that the process exits with
status 2 instead of 128+SIGQUIT.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dockerd handles SIGQUIT by dumping all goroutine stacks to standard
error and exiting. In contrast, the Go runtime's default SIGQUIT
behaviour... dumps all goroutine stacks to standard error and exits.
The default SIGQUIT behaviour is implemented directly in the runtime's
signal handler, and so is both more robust to bugs in the Go runtime and
does not perturb the state of the process to anywhere near same degree
as dumping goroutine stacks from a user goroutine. The only notable
difference from a user's perspective is that the process exits with
status 2 instead of 128+SIGQUIT.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/dockerd: fix empty-lines (revive)</title>
<updated>2022-09-27T23:58:52+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2022-09-23T20:36:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=f63dea43378506ba653545ee06f0da422f160ad9'/>
<id>f63dea43378506ba653545ee06f0da422f160ad9</id>
<content type='text'>
    cmd/dockerd/trap/trap_linux_test.go:29:29: empty-lines: extra empty line at the end of a block (revive)
    cmd/dockerd/daemon.go:327:35: empty-lines: extra empty line at the start of a block (revive)

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    cmd/dockerd/trap/trap_linux_test.go:29:29: empty-lines: extra empty line at the end of a block (revive)
    cmd/dockerd/daemon.go:327:35: empty-lines: extra empty line at the start of a block (revive)

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gofmt GoDoc comments with go1.19</title>
<updated>2022-07-08T17:56:23+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2022-07-08T16:27:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=52c1a2fae8ffe3efc8b24ef53a702582131ebc57'/>
<id>52c1a2fae8ffe3efc8b24ef53a702582131ebc57</id>
<content type='text'>
Older versions of Go don't format comments, so committing this as
a separate commit, so that we can already make these changes before
we upgrade to Go 1.19.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Older versions of Go don't format comments, so committing this as
a separate commit, so that we can already make these changes before
we upgrade to Go 1.19.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: move from io/ioutil to io and os package</title>
<updated>2021-08-27T06:56:57+00:00</updated>
<author>
<name>Eng Zer Jun</name>
<email>engzerjun@gmail.com</email>
</author>
<published>2021-08-24T10:10:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=c55a4ac7795c7606b548b38e24673733481e2167'/>
<id>c55a4ac7795c7606b548b38e24673733481e2167</id>
<content type='text'>
The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

Signed-off-by: Eng Zer Jun &lt;engzerjun@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

Signed-off-by: Eng Zer Jun &lt;engzerjun@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to Go 1.17.0, and gofmt with Go 1.17</title>
<updated>2021-08-24T21:33:27+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2021-08-23T13:14:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=686be57d0a6e514c0cddb2f3ac9cbb3cbef87f5f'/>
<id>686be57d0a6e514c0cddb2f3ac9cbb3cbef87f5f</id>
<content type='text'>
Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pkg/signal: move Trap() to cmd/dockerd</title>
<updated>2021-07-15T16:11:00+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2021-07-15T16:08:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=0880df4644dcd6a6a79db27b7d0092c74bf90487'/>
<id>0880df4644dcd6a6a79db27b7d0092c74bf90487</id>
<content type='text'>
It's the only location where this is used, and it's quite specific
to dockerd (not really a reusable function for external use), so
moving it into that package.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's the only location where this is used, and it's quite specific
to dockerd (not really a reusable function for external use), so
moving it into that package.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
</feed>
