Skip to content

Commit 27d09f0

Browse files
authored
Add signal handler for SIGABRT_COMPAT on Windows. (#1056)
The special-case signal handling implemented for Windows doesn't currently set a handler for `SIGABRT_COMPAT` (which is a synonym of `SIGABRT` with a different value.) This PR adds it to the list of signals we install handlers for. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent 1ba4e6f commit 27d09f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Testing/ExitTests/ExitTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ extension ExitTest {
218218
// exit code that is unlikely to be encountered "in the wild" and which
219219
// encodes the caught signal. Corresponding code in the parent process looks
220220
// for these special exit codes and translates them back to signals.
221-
for sig in [SIGINT, SIGILL, SIGFPE, SIGSEGV, SIGTERM, SIGBREAK, SIGABRT] {
221+
for sig in [SIGINT, SIGILL, SIGFPE, SIGSEGV, SIGTERM, SIGBREAK, SIGABRT, SIGABRT_COMPAT] {
222222
_ = signal(sig) { sig in
223223
_Exit(STATUS_SIGNAL_CAUGHT_BITS | sig)
224224
}

0 commit comments

Comments
 (0)