Ignore fflush(3) return value
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.
This commit is contained in:
parent
9a71bcdab2
commit
b742d8c1b8
@ -1581,8 +1581,7 @@ trace_syscall_entering(struct tcb *tcp)
|
|||||||
else
|
else
|
||||||
res = (*sysent[tcp->scno].sys_func)(tcp);
|
res = (*sysent[tcp->scno].sys_func)(tcp);
|
||||||
|
|
||||||
if (fflush(tcp->outf) == EOF)
|
fflush(tcp->outf);
|
||||||
return -1;
|
|
||||||
ret:
|
ret:
|
||||||
tcp->flags |= TCB_INSYSCALL;
|
tcp->flags |= TCB_INSYSCALL;
|
||||||
/* Measure the entrance time as late as possible to avoid errors. */
|
/* Measure the entrance time as late as possible to avoid errors. */
|
||||||
|
Loading…
Reference in New Issue
Block a user