From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19734 invoked by alias); 10 Sep 2005 02:18:06 -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 19701 invoked by uid 22791); 10 Sep 2005 02:18:00 -0000 Received: from gateway-1237.mvista.com (HELO av.mvista.com) (12.44.186.158) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 10 Sep 2005 02:18:00 +0000 Received: from [10.235.23.1] (av [127.0.0.1]) by av.mvista.com (8.9.3/8.9.3) with ESMTP id TAA05503; Fri, 9 Sep 2005 19:17:56 -0700 Message-ID: <432240C1.9000308@mvista.com> Date: Sat, 10 Sep 2005 02:18:00 -0000 From: Qunying Pan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com CC: drow@false.org, qunyingpan@gmail.com Subject: Patch: fix gdb_gcore.sh failure in ash/dash Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-09/txt/msg00062.txt.bz2 Hi, Running gdb_gcore.sh in ash/dash fails with message "Hangup detected on fd 0". The following patch fixes the problem. Acceptable? Thanks, Qunying 2005-09-09 Qunying Pan *gdb_gcore.sh: Invoke gdb in batch mode to fix gdb_gcore.sh failure in ash/dash. --- src/gdb/gdb_gcore.sh.orig 2005-09-09 16:56:04.000000000 -0700 +++ src/gdb/gdb_gcore.sh 2005-09-09 16:58:12.000000000 -0700 @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2003 Free Software Foundation, Inc. +# Copyright 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -59,7 +59,7 @@ do # Avoid need for temporary files by using funky "here # document" feature of sh. - /usr/bin/gdb > /dev/null << EOF + /usr/bin/gdb -batch -x /dev/stdin > /dev/null << EOF attach $pid gcore $name.$pid detach