# std.os: fix error codes for execve · gitcafe/zig

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

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

Visibility: public

Requested revision: 877a1f2a2986e02269c64a05456dff521da27ac1

Requested commit: 877a1f2a2986e02269c64a05456dff521da27ac1

Commit: 877a1f2a2986e02269c64a05456dff521da27ac1

Tree: f942b400d4edf23e64b70f81b3ce4660c542e924

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.os: fix error codes for execve

execve can return EBADLIB on Linux. I observed this when passing
an x86_64 interpreter path to qemu-i386.

This error code is Linux and Solaris-only. I came up with an improved
pattern for dealing with OS-specific error codes.

```

## Parents

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

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