Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #4192

Re: Aborting Python from C code

Path csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.029
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'subject:Python': 0.04; 'handler': 0.05; 'python': 0.07; 'pm,': 0.11; 'wrote:': 0.14; 'abort': 0.16; 'dumps': 0.16; 'return.': 0.16; 'header:In-Reply- To:1': 0.22; 'subject:code': 0.23; 'script': 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'core': 0.28; 'sat,': 0.29; 'like.': 0.29; 'to:addr:python-list': 0.32; 'another': 0.32; 'force': 0.35; 'normally': 0.35; 'trigger': 0.35; 'received:209.85': 0.37; 'exactly': 0.37; 'apr': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'signal': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'would': 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'our': 0.63; '30,': 0.80; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=BJSD2OoazcFT0Dr2K4rxCBC6WgaZ/1LGy97qZf7fwMM=; b=U/qAQ7RQ1EFRy+31vlEsXcr1I09o5RCOMKu8tjHy5eJMdC1nnwLErCh0Y+t1kzI1xa NxUs4Mp1HWEQqUUNEtko4TmIu14Z+YNn+QHLrfym0mFWiOs70G6al+87j4uU5sMh83Mh WFFUcxZZyzT9k8EgGzeQctPU9k2IiguntjRmE=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=u2TIrUveubV1Lp0u/81G7zJnLYPjE/v6zBqsEs0vD1/IxI7Ho/dlUoSTH1naCJ1Jv7 Sqzvf+Qjs+M+aTukg6GB4X/D0zY+unrvLlIARqzHxjz3NbtfUvRN/CTgUKfCRojRr4eB 0qXscJCibRUG0XJsUUi0xUfOx1DLhwrpsf6io=
MIME-Version 1.0
In-Reply-To <c63e7579-16d1-4bfa-8486-8ab791343dba@glegroupsg2000goo.googlegroups.com>
References <mailman.974.1304041735.9059.python-list@python.org> <c63e7579-16d1-4bfa-8486-8ab791343dba@glegroupsg2000goo.googlegroups.com>
Date Sat, 30 Apr 2011 18:17:10 +1000
Subject Re: Aborting Python from C code
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1015.1304151439.9059.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 82.94.164.166
X-Trace 1304151439 news.xs4all.nl 81481 [::ffff:82.94.164.166]:57727
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:4192

Show key headers only | View raw


On Sat, Apr 30, 2011 at 6:08 PM, Miki Tebeka <miki.tebeka@gmail.com> wrote:
>> In our sandboxed Python environment, I would like to be able to
>> trigger an abort of the currently-running Python script (from a signal
>> handler or another thread).
> There's os.abort

That core dumps the process; what I want is to force the
PyRun_StringFlags to return. Normally PyErr_SetInterrupt will do
exactly this (within a few instructions is fine), but the Python
script is able to prevent that from happening, which I don't like.

Chris Angelico

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Aborting Python from C code Miki Tebeka <miki.tebeka@gmail.com> - 2011-04-30 01:08 -0700
  Re: Aborting Python from C code Chris Angelico <rosuav@gmail.com> - 2011-04-30 18:17 +1000
  Re: Aborting Python from C code Chris Angelico <rosuav@gmail.com> - 2011-05-04 19:02 +1000
  newbie needs help with cookielib "Sells, Fred" <fred.sells@adventistcare.org> - 2011-05-04 13:16 -0400

csiph-web