From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12017 invoked by alias); 21 Jun 2003 18:39:27 -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 11873 invoked from network); 21 Jun 2003 18:39:26 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 21 Jun 2003 18:39:26 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19TnHd-0006In-00 for ; Sat, 21 Jun 2003 13:40:17 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19TnGm-0006VD-00 for ; Sat, 21 Jun 2003 14:39:24 -0400 Date: Sat, 21 Jun 2003 18:39:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFA] Use vfork in shell_escape Message-ID: <20030621183923.GA24979@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20021022015205.GA22323@nevyn.them.org> <20021105214414.GB17994@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021105214414.GB17994@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00674.txt.bz2 On Tue, Nov 05, 2002 at 04:44:14PM -0500, Daniel Jacobowitz wrote: > On Mon, Oct 21, 2002 at 09:52:05PM -0400, 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? > > Updated as suggested, to use gdb_vfork.h. Fernando, is this OK? I've checked in this old patch. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2003-06-21 Daniel Jacobowitz * Makefile.in (cli-cmds.o): Depend on $(gdb_vfork_h) * cli/cli-cmds.c: Include "gdb_vfork.h". (shell_escape): Use vfork. Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.408 diff -u -p -r1.408 Makefile.in --- Makefile.in 19 Jun 2003 22:52:03 -0000 1.408 +++ Makefile.in 21 Jun 2003 18:36:46 -0000 @@ -2416,7 +2416,7 @@ cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(d $(gdb_wait_h) $(gdb_regex_h) $(gdb_string_h) $(filenames_h) \ $(ui_out_h) $(top_h) $(cli_decode_h) $(cli_script_h) \ $(cli_setshow_h) $(cli_cmds_h) $(source_h) $(linespec_h) \ - $(expression_h) $(language_h) $(objfiles_h) + $(expression_h) $(language_h) $(objfiles_h) $(gdb_vfork_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ $(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \ Index: cli/cli-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v retrieving revision 1.31 diff -u -p -r1.31 cli-cmds.c --- cli/cli-cmds.c 8 Jun 2003 18:27:14 -0000 1.31 +++ cli/cli-cmds.c 21 Jun 2003 18:36:46 -0000 @@ -26,6 +26,7 @@ #include "gdb_wait.h" /* For shell escape implementation */ #include "gdb_regex.h" /* Used by apropos_command */ #include "gdb_string.h" +#include "gdb_vfork.h" #include "linespec.h" #include "expression.h" #include "frame.h" @@ -509,7 +510,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);