Date: Wed, 17 Jan 2018 16:55:36 +0000 (UTC) From: Fabien Thomas <fabient@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328088 - head/usr.sbin/pmcstat Message-ID: <201801171655.w0HGtaeN075277@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: fabient Date: Wed Jan 17 16:55:35 2018 New Revision: 328088 URL: https://svnweb.freebsd.org/changeset/base/328088 Log: 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 Modified: head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Wed Jan 17 16:41:22 2018 (r328087) +++ head/usr.sbin/pmcstat/pmcstat.c Wed Jan 17 16:55:35 2018 (r328088) @@ -1350,6 +1350,7 @@ main(int argc, char **argv) } /* print out counting PMCs */ if ((args.pa_flags & FLAG_DO_TOP) && + (args.pa_flags & FLAG_HAS_PIPE) && pmc_flush_logfile() == 0) do_read = 1; do_print = 1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801171655.w0HGtaeN075277>