Okay, I know this is a bit pathological, but it's
useful and works as expected without -o.
strace -c, will produce a summary for the parent
process, excluding forked children.
strace -c -ff, will produce a summary for the parent
and children combined.
strace -c -o <foo> places the summary output in <foo>
for the parent, excluding children.
strace -c -ff -o <foo> creates <foo> and <foo>.pid for
the parent and children, but they are all empty. This
behaviour doesn't follow the established pattern, and
besides a buch of empty files aren't all that helpful.
This patch will produce the same output as strace -c
-ff, but the output will go to the file specified by
-o, it could be easily argued that it should be by
.pid, but the math doesn't really work and it would
require some serious work to fix. It also wouldn't
match the output of the non -o execution.
Anyway, questions, comments?
Logged In: YES
user_id=839907
I must have missed the checkbox to upload the patch file.
Follow forks summary with specified output file patch
Logged In: YES
user_id=26437
Commented at
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=187847#c7
Moved to https://github.com/strace/strace/issues/43 .