<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/runtime/testdata/testexithooks, branch master</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>runtime: add cgo guard for exit hooks test</title>
<updated>2022-09-27T13:46:23+00:00</updated>
<author>
<name>Than McIntosh</name>
<email>thanm@google.com</email>
</author>
<published>2022-09-27T00:52:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=550864e5d20d6d3507aae7d2797f84140963d555'/>
<id>550864e5d20d6d3507aae7d2797f84140963d555</id>
<content type='text'>
Add an additional guard to ensure that we don't try to run the "-race"
variant of the exit hooks test when CGO is explicitly turned off via
CGO_ENABLED=0 (this fixes a failure on the no-cgo builder caused
by CL 354790).

Change-Id: I9dc7fbd71962e9a098916da69d9119a753f27116
Reviewed-on: https://go-review.googlesource.com/c/go/+/434935
Run-TryBot: Than McIntosh &lt;thanm@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an additional guard to ensure that we don't try to run the "-race"
variant of the exit hooks test when CGO is explicitly turned off via
CGO_ENABLED=0 (this fixes a failure on the no-cgo builder caused
by CL 354790).

Change-Id: I9dc7fbd71962e9a098916da69d9119a753f27116
Reviewed-on: https://go-review.googlesource.com/c/go/+/434935
Run-TryBot: Than McIntosh &lt;thanm@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: add an exit hook facility</title>
<updated>2022-09-26T21:49:14+00:00</updated>
<author>
<name>Than McIntosh</name>
<email>thanm@google.com</email>
</author>
<published>2021-10-08T15:51:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=07bdf1dc545c6f6e59f5780a9024e6f230d9b434'/>
<id>07bdf1dc545c6f6e59f5780a9024e6f230d9b434</id>
<content type='text'>
Add a new API (not public/exported) for registering a function with
the runtime that should be called when program execution terminates,
to be used in the new code coverage re-implementation. The API looks
like

  func addExitHook(f func(), runOnNonZeroExit bool)

The first argument is the function to be run, second argument controls
whether the function is invoked even if there is a call to os.Exit
with a non-zero status. Exit hooks are run in reverse order of
registration, e.g. the first hook to be registered will be the last to
run. Exit hook functions are not allowed to panic or to make calls to
os.Exit.

Updates #51430.

Change-Id: I906f8c5184b7c1666f05a62cfc7833bf1a4300c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/354790
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Than McIntosh &lt;thanm@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new API (not public/exported) for registering a function with
the runtime that should be called when program execution terminates,
to be used in the new code coverage re-implementation. The API looks
like

  func addExitHook(f func(), runOnNonZeroExit bool)

The first argument is the function to be run, second argument controls
whether the function is invoked even if there is a call to os.Exit
with a non-zero status. Exit hooks are run in reverse order of
registration, e.g. the first hook to be registered will be the last to
run. Exit hook functions are not allowed to panic or to make calls to
os.Exit.

Updates #51430.

Change-Id: I906f8c5184b7c1666f05a62cfc7833bf1a4300c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/354790
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Than McIntosh &lt;thanm@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
