From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19740 invoked by alias); 22 Oct 2002 01:51:48 -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 19731 invoked from network); 22 Oct 2002 01:51:47 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 22 Oct 2002 01:51:47 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 183p8d-0003eb-00; Mon, 21 Oct 2002 21:51:23 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 183oDF-0005oO-00; Mon, 21 Oct 2002 21:52:05 -0400 Date: Mon, 21 Oct 2002 18:51:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Cc: fnasser@redhat.com Subject: [RFA] Use vfork in shell_escape Message-ID: <20021022015205.GA22323@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, fnasser@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2002-10/txt/msg00380.txt.bz2 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? -- 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);