Skip to content

Commit 4061d69

Browse files
committed
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 42e688f commit 4061d69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Testing/ExitTests/ExitTest.swift

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

0 commit comments

Comments
 (0)