# Fix fork\(\) on Linux/sparc64 · gitcafe/zig

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

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

Visibility: public

Requested revision: 41c40f4bbec35ac260b6a7af6b0db0dafccb56ca

Requested commit: 41c40f4bbec35ac260b6a7af6b0db0dafccb56ca

Commit: 41c40f4bbec35ac260b6a7af6b0db0dafccb56ca

Tree: 4ae6c1d7792ff784beea71c863bd176a1fe93144

Author: Koakuma

Committer: Koakuma

## Message

```
Fix fork() on Linux/sparc64

fork() on Linux/sparc64 seems to return its result in two registers,
with %o0 always holding the current process' PID, and the parent/child
status returned in %o1. Add some glue code to convert those into
the libc-style return value.

```

## Parents

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

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