strace used to honor fflush(3) return value in trace_syscall_entering
which resulted to tracees not being PTRACE_SYSCALL'ed which in turn
caused nasty hangups like this one:
$ strace -o'|:' pwd
|:: Broken pipe
There is little strace can do in case of fflush(3) returning EOF, and
hangup is certainly not the best solution for the issue.
* syscall.c (trace_syscall_entering): Ignore fflush(3) return value.
else
res = (*sysent[tcp->scno].sys_func)(tcp);
- if (fflush(tcp->outf) == EOF)
- return -1;
+ fflush(tcp->outf);
ret:
tcp->flags |= TCB_INSYSCALL;
/* Measure the entrance time as late as possible to avoid errors. */