mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-18 01:36:08 +03:00

When trying to run valgrind this incorrectly results in a correct
result, this is because `posix.errno` will use libc errno when linking
libc which ghostty does.
cf90dfd309/lib/std/posix.zig (L219-L221)
Since we are making the syscall directly we should not use this function
but rather use the return code directly on the enum, name from this
function seems odd to me (no zig experience) but it is the suggested
answer from zig (refer to issue below)
https://github.com/ziglang/zig/issues/22718
Note this definitely isnt much better than what we were doing before in
the case of running in valgrind
```text
error(linux-cgroup): unable to clone: os.linux.E__enum_81093.NOSYS
debug(io_thread): IO thread exited
warning(io_thread): error in io thread err=error.CloneError
warning(io_thread): abrupt io thread exit detected, starting xev to drain mailbox
debug(io_thread): io thread fully exiting after abnormal failure
```
opening a new tab shows
```
error starting IO thread: error.CloneError
The underlying shell or command was unable to be started.
This error is usually due to exhausting a system resource.
If this looks like a bug, please report it.
This terminal is non-functional. Please close it and try again.
```
this did not show on the original surface only on the new tab