fastfetch icon indicating copy to clipboard operation
fastfetch copied to clipboard

[BUG] fastfetch failed to retrieve command output

Open dwlfrth opened this issue 1 year ago • 4 comments

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

dwlfrth avatar Nov 26 '24 16:11 dwlfrth

Note: The command is being executed successfully...

dwlfrth avatar Nov 26 '24 18:11 dwlfrth

Confirmed that it works in Linux but not macOS

CarterLi avatar Nov 27 '24 01:11 CarterLi

Confirmed that it works in FreeBSD & NetBSD too despite they all share the same code.

I assume it's a macOS kernel bug.

CarterLi avatar Nov 28 '24 01:11 CarterLi

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.

CarterLi avatar Nov 15 '25 12:11 CarterLi