# std: Make atfork handler more robust · gitcafe/zig

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

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

Visibility: public

Requested revision: ec9a44b2a59a9061e1979be5268dd657cd5402fd

Requested commit: ec9a44b2a59a9061e1979be5268dd657cd5402fd

Commit: ec9a44b2a59a9061e1979be5268dd657cd5402fd

Tree: 9dc2eaa0fd82e58ec83c58c6bcf5c7bc5db1659b

Author: LemonBoy

Committer: LemonBoy

## Message

```
std: Make atfork handler more robust

The atfork handler is executed even when fork()-ing threads that have
never initialized their local csprng. Handle this case gracefully
instead of raising a runtime error.

Fixes #8841

```

## Parents

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

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