[BUG] fastfetch failed to retrieve command output
Be sure to read the FAQ before submitting a new issue.
General description of bug:
- What happened: Command output is not displayed
- What should happen: Command output should be displayed
- Fastfetch version used: fastfetch 2.30.1 (aarch64)
- Did it work in an older version: N/A
- Where did you get the binary: Homebrew
- Does this issue still occur in the latest dev build? N/A
Often helpful information:
Screenshot:
N/A
The content of the configuration file you use (if any):
{
"type": "command",
"text": "/usr/bin/ssh-agent",
}
Output of fastfetch -c ci.jsonc --format json:
N/A
Output of fastfetch --list-features:
threads
vulkan
imagemagick7
chafa
zlib
sqlite3
Note: The command is being executed successfully...
Confirmed that it works in Linux but not macOS
Confirmed that it works in FreeBSD & NetBSD too despite they all share the same code.
I assume it's a macOS kernel bug.
Reverted the fix commit https://github.com/fastfetch-cli/fastfetch/commit/e9ab67b380734d5c9527376b0b5e38b90bf37b97
The fix, which relies SIGCHILD to interupt poll(2) calls, causes issues as now Command module can be executed in parallel. This issue happens only in macOS & only happens if you spawn a process which forks itself as a daemon process. One should never do this in fastfetch as the daemon processes never exit.