From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 12:08:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD1FD1065686; Tue, 23 Dec 2008 12:08:07 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF05B8FC66; Tue, 23 Dec 2008 12:08:06 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNC86Ta099362; Tue, 23 Dec 2008 12:08:06 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNC86QR099361; Tue, 23 Dec 2008 12:08:06 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200812231208.mBNC86QR099361@svn.freebsd.org> From: Joseph Koshy Date: Tue, 23 Dec 2008 12:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186425 - head/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 12:08:08 -0000 Author: jkoshy Date: Tue Dec 23 12:08:06 2008 New Revision: 186425 URL: http://svn.freebsd.org/changeset/base/186425 Log: Close the read side of the pipe to self when exiting. Modified: head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Tue Dec 23 09:11:05 2008 (r186424) +++ head/usr.sbin/pmcstat/pmcstat.c Tue Dec 23 12:08:06 2008 (r186425) @@ -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),