summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pmcstat/pmcstat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index ea7264c..6496ddb 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -1264,6 +1264,9 @@ main(int argc, char **argv)
/* Kill the child process if we started it */
if (args.pa_flags & FLAG_HAS_COMMANDLINE)
pmcstat_kill_process(&args);
+ /* Close the pipe to self, if present. */
+ if (args.pa_flags & FLAG_HAS_PIPE)
+ (void) close(pipefd[READPIPEFD]);
runstate = PMCSTAT_FINISHED;
} else if (kev.ident == SIGWINCH) {
if (ioctl(fileno(args.pa_printfile),
OpenPOWER on IntegriCloud