From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32708 invoked by alias); 4 Dec 2002 16:18:32 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 32693 invoked from network); 4 Dec 2002 16:18:30 -0000 Received: from unknown (HELO diana.inter.net.il) (192.114.186.19) by sources.redhat.com with SMTP; 4 Dec 2002 16:18:30 -0000 Received: from zaretsky (adsl-ayalon-pc-128-229.inter.net.il [213.8.128.229]) by diana.inter.net.il (Mirapoint Messaging Server MOS 3.2.1-GA) with ESMTP id ARU19454; Wed, 4 Dec 2002 18:18:12 +0200 (IST) Date: Wed, 04 Dec 2002 08:18:00 -0000 From: "Eli Zaretskii" To: a2782@dis.ulpgc.es Message-Id: <3405-Wed04Dec2002181724+0200-eliz@is.elta.co.il> CC: gdb@sources.redhat.com In-reply-to: <200212041436.gB4EaaP03992@siglo21.dis.ulpgc.es> (a2782@dis.ulpgc.es) Subject: Re: Pipe question Reply-to: Eli Zaretskii References: <200212041436.gB4EaaP03992@siglo21.dis.ulpgc.es> X-SW-Source: 2002-12/txt/msg00075.txt.bz2 > Date: Wed, 4 Dec 2002 14:36:36 GMT > From: a2782@dis.ulpgc.es > > system(strcat(\"gdb --quiet -f \",executable)); I hope this is not your actual code: you cannot strcat onto a constant string. It's a bug. > But when I close the program, I only write \"quit\\n\" to togdb[1]. This > causes that the program doesn\'t end properly (GDB, which is the child > process, ends well). I have to go and type \"kill\" in a console. Could > anybody tell me what instructions I have to put in the end of the > program in order to finish it succesfully (without kill)? When you give GDB the `quit' command, it asks whether to kill the program being debugged; you need to respond with "yes". So something like "quit\nyes\n" should do the trick (but I didn't actually try this, so I might miss something).