# std.posix.abort: only trigger breakpoint on Windows if being debugged · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/dae703d3c028eab3bf98d89d2bca1abc75f864fa)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: dae703d3c028eab3bf98d89d2bca1abc75f864fa

Requested commit: dae703d3c028eab3bf98d89d2bca1abc75f864fa

Commit: dae703d3c028eab3bf98d89d2bca1abc75f864fa

Tree: 4bd94cfc89a12966a4d585f1c2da73ec861c6a8b

Author: mlugg

Committer: mlugg

## Message

```
std.posix.abort: only trigger breakpoint on Windows if being debugged

Processes should reasonably be able to expect their children to abort
with typical exit codes, rather than a debugger breakpoint signal. This
flag in the PEB is what would be checked by `IsDebuggerPresent` in
kernel32, which is the function you would typically use for this
purpose.

This fixes `test-stack-trace` failures on Windows, as these tests were
expecting exit code 3 to indicate abort.

```

## Parents

- [2ab650b4817cbb22244c17de828e82cbb0ccf15e](https://git.cafe/gitcafe/zig/commit/2ab650b4817cbb22244c17de828e82cbb0ccf15e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/dae703d3c028eab3bf98d89d2bca1abc75f864fa?format=markdown)
