From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22106 invoked by alias); 22 Oct 2002 20:54:15 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21975 invoked from network); 22 Oct 2002 20:54:14 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 22 Oct 2002 20:54:14 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g9MKWsw15320 for ; Tue, 22 Oct 2002 16:32:54 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9MKs7l24183; Tue, 22 Oct 2002 16:54:07 -0400 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g9MKs1D21069; Tue, 22 Oct 2002 13:54:01 -0700 Message-ID: <3DB5BAE9.2A01D78F@redhat.com> Date: Tue, 22 Oct 2002 13:54:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com, fnasser@redhat.com Subject: Re: [RFA] Use vfork in shell_escape References: <20021022015205.GA22323@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00422.txt.bz2 Daniel Jacobowitz wrote: > > This patch is pretty obvious. I couldn't figure out why my machine was > running out of memory; forking GDB to run an 'ls' during the maint.exp tests > can be a bit heavy, since it may have all of glibc's debug info loaded. > This patch seems logical to me... OK to commit? Not as is. There's some auto-confery involved, since many systems (some systems?) don't have vfork. Grep for vfork in fork-child.c. > > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer > > 2002-10-21 Daniel Jacobowitz > > * cli/cli-cmds.c (shell_escape): Use vfork. > > Index: cli/cli-cmds.c > =================================================================== > RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v > retrieving revision 1.22 > diff -u -p -r1.22 cli-cmds.c > --- cli/cli-cmds.c 22 Sep 2002 22:18:41 -0000 1.22 > +++ cli/cli-cmds.c 22 Oct 2002 01:47:15 -0000 > @@ -517,7 +517,7 @@ shell_escape (char *arg, int from_tty) > else > p++; /* Get past '/' */ > > - if ((pid = fork ()) == 0) > + if ((pid = vfork ()) == 0) > { > if (!arg) > execl (user_shell, p, 0);