mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
53922779ba
- Use pipe2 on Linux and BSDs, which can set all flags through a single syscall. - macOS/darwin does not support pipe2, add a wrapper for it. - Close pipes when fork() failed. These fds should be closed when the function returns. - Set O_CLOEXEC at pipes, the exec() family of functions will close this fds automatically. - Use _exit instead of exit. Exit calls the callbacks registered by atexit and flushes the stdio's buffer, which can lead to some unexpected behavior, especially after an exec syscall failure. - Fix timeout. - Not use non-blocking IO. because we only wait for one file, and cannot do other things during waiting.