From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93085 invoked by alias); 19 Jan 2020 17:27:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 93076 invoked by uid 89); 19 Jan 2020 17:27:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:760, our X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 19 Jan 2020 17:27:29 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1itEMA-0007JU-8K; Sun, 19 Jan 2020 12:27:26 -0500 Received: from [176.228.60.248] (port=4531 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1itEM5-0002zX-1d; Sun, 19 Jan 2020 12:27:22 -0500 Date: Sun, 19 Jan 2020 19:13:00 -0000 Message-Id: <83pnffxsoy.fsf@gnu.org> From: Eli Zaretskii To: Simon Marchi CC: gdb-patches@sourceware.org In-reply-to: <7a3aa41f-367f-aa51-9b39-342874d9205e@simark.ca> (message from Simon Marchi on Sun, 19 Jan 2020 12:01:33 -0500) Subject: Re: Discrepancy between Python and Guile wrt exiting the interpreter References: <83a76l10r6.fsf@gnu.org> <83tv4rxuut.fsf@gnu.org> <7a3aa41f-367f-aa51-9b39-342874d9205e@simark.ca> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00591.txt.bz2 > Cc: gdb-patches@sourceware.org > From: Simon Marchi > Date: Sun, 19 Jan 2020 12:01:33 -0500 > > When using the various PyRun_Interactive* functions, it seems like the interpreter is > catching the SystemExit exception and calling the C exit() function before returning > to our code, so we don't have a chance to do handle it from the caller of > PyRun_Interactive* function. Too bad. The context of these questions is the Emacs's front-end for GDB, which uses MI, and that adds even more complexities to this already quite complex situation, in particular because Emacs until now didn't know (nor care) whether the user invoked Python or Guile interpreter. Thanks.