From owner-svn-src-head@freebsd.org Thu Nov 17 23:16:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AB8EC47812; Thu, 17 Nov 2016 23:16:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C7C596F; Thu, 17 Nov 2016 23:16:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAHNGuCX064390; Thu, 17 Nov 2016 23:16:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAHNGuYV064389; Thu, 17 Nov 2016 23:16:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201611172316.uAHNGuYV064389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Nov 2016 23:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308788 - head/usr.bin/gcore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Nov 2016 23:16:57 -0000 Author: bdrewery Date: Thu Nov 17 23:16:56 2016 New Revision: 308788 URL: https://svnweb.freebsd.org/changeset/base/308788 Log: Cleanup some leftovers from '-s' removal in r302792. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/gcore/gcore.c Modified: head/usr.bin/gcore/gcore.c ============================================================================== --- head/usr.bin/gcore/gcore.c Thu Nov 17 23:05:34 2016 (r308787) +++ head/usr.bin/gcore/gcore.c Thu Nov 17 23:16:56 2016 (r308788) @@ -143,21 +143,6 @@ main(int argc, char *argv[]) fd = open(corefile, O_RDWR|O_CREAT|O_TRUNC, DEFFILEMODE); if (fd < 0) err(1, "%s", corefile); - /* - * The semantics of the 's' flag is to stop the target process. - * Previous versions of gcore would manage this by trapping SIGHUP, - * SIGINT and SIGTERM (to be passed to the target pid), and then - * signal the child to stop. - * - * However, this messes up if the selected dumper uses ptrace calls - * that leave the child already stopped. The waitpid call in elfcore - * never returns. - * - * The best thing to do here is to externalize the 's' flag and let - * each dumper dispose of what that means, if anything. For the elfcore - * dumper, the 's' flag is a no-op since the ptrace attach stops the - * process in question already. - */ dumper->dump(efd, fd, pid); (void)close(fd); @@ -169,6 +154,6 @@ void usage(void) { - (void)fprintf(stderr, "usage: gcore [-s] [-c core] [executable] pid\n"); + (void)fprintf(stderr, "usage: gcore [-c core] [executable] pid\n"); exit(1); }