Thanks for the bug report. What is the output of the following command
on Fedora rawhide?
LC_ALL=C strace src/grep -q --help >/dev/full
On my Fedora 41 x86-64 host, the output of the above command ends as
follows; what's different on your platform?
sigaltstack({ss_sp=0x429f40, ss_flags=0, ss_size=65536}, NULL) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x41a370, sa_mask=[HUP INT QUIT USR1
USR2 PIPE ALRM TERM CHLD URG XCPU XFSZ VTALRM PROF WINCH IO PWR],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7fd8b3e1e050},
NULL, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x41a370, sa_mask=[HUP INT QUIT USR1
USR2 PIPE ALRM TERM CHLD URG XCPU XFSZ VTALRM PROF WINCH IO PWR],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7fd8b3e1e050},
NULL, 8) = 0
fstat(1, {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1, 0x7), ...}) = 0
ioctl(1, TCGETS, 0x7ffc70791e50) = -1 ENOTTY (Inappropriate ioctl
for device)
write(1, "Usage: grep [OPTION]... PATTERNS"..., 4096) = -1 ENOSPC (No
space left on device)
close(1) = 0
write(2, "src/grep: ", 10src/grep: ) = 10
write(2, "write error", 11write error) = 11
write(2, ": No space left on device", 25: No space left on device) = 25
write(2, "\n", 1
) = 1
exit_group(2) = ?
+++ exited with 2 +++