From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29462 invoked from network); 11 Mar 2023 11:28:59 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 11 Mar 2023 11:28:59 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 7D3244124E; Sat, 11 Mar 2023 21:28:58 +1000 (AEST) Received: from relay05.pair.com (relay05.pair.com [216.92.24.67]) by minnie.tuhs.org (Postfix) with ESMTPS id B192B40A4A for ; Sat, 11 Mar 2023 21:28:50 +1000 (AEST) Received: from orac.inputplus.co.uk (unknown [84.51.130.45]) by relay05.pair.com (Postfix) with ESMTP id EDF4F1A2746 for ; Sat, 11 Mar 2023 06:28:49 -0500 (EST) Received: from orac.inputplus.co.uk (orac.inputplus.co.uk [IPv6:::1]) by orac.inputplus.co.uk (Postfix) with ESMTP id 22C0920145 for ; Sat, 11 Mar 2023 11:28:49 +0000 (GMT) From: Ralph Corderoy To: coff@tuhs.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-reply-to: <20230310174222.GB9225@mcvoy.com> References: <69248852-1701-4938-8A4D-3B27F3018E83@iitbombay.org> <20230310174222.GB9225@mcvoy.com> Date: Sat, 11 Mar 2023 11:28:49 +0000 Message-Id: <20230311112849.22C0920145@orac.inputplus.co.uk> Message-ID-Hash: 2PKSXI2HRVNSRVASRLHNRJUMY6KBJJGO X-Message-ID-Hash: 2PKSXI2HRVNSRVASRLHNRJUMY6KBJJGO X-MailFrom: ralph@inputplus.co.uk X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] Conditions, AKA exceptions. List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi Larry, > cmd = aprintf("gdb -batch -ex backtrace '%s/bk' %u 1>&%d 2>&%d", > bin, getpid(), fileno(f), fileno(f)); > > system(cmd); I also came up with this, probably on an SGI Iris Indigo, and got it added to the Unix Programming FAQ. :-) 6.5 How can I generate a stack dump from within a running program? http://www.faqs.org/faqs/unix-faq/programmer/faq/ It works surprisingly often, i.e. the process is healthy enough to run system(3). -- Cheers, Ralph.