mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
Only call flush in pipe mode.
It fixes a crash with a socket in top mode. Ex: # pmcstat -R 127.0.0.1:8080 -T -w1 then # pmcstat -n1 -Sclock.prof -Slock.failed -O 127.0.0.1:8080 MFC after: 1 week Sponsored by: Stormshield
This commit is contained in:
parent
9f4f1d4d1f
commit
cb43ed2815
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328088
@ -1350,6 +1350,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
/* print out counting PMCs */
|
/* print out counting PMCs */
|
||||||
if ((args.pa_flags & FLAG_DO_TOP) &&
|
if ((args.pa_flags & FLAG_DO_TOP) &&
|
||||||
|
(args.pa_flags & FLAG_HAS_PIPE) &&
|
||||||
pmc_flush_logfile() == 0)
|
pmc_flush_logfile() == 0)
|
||||||
do_read = 1;
|
do_read = 1;
|
||||||
do_print = 1;
|
do_print = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user