mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
Close the read side of the pipe to self when exiting.
This commit is contained in:
parent
6333256401
commit
8cfb4353c2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186425
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user