Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news-transit.tcx.org.uk!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'say.': 0.07; 'received:209.85.210.174': 0.13; 'received:mail- iy0-f174.google.com': 0.13; '(windows': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'seems': 0.20; 'header:In-Reply-To:1': 0.22; '(on': 0.23; 'way?': 0.23; 'works.': 0.23; 'fine': 0.24; 'code': 0.25; 'message- id:@mail.gmail.com': 0.28; '24,': 0.29; 'nov': 0.29; 'pm,': 0.29; 'thu,': 0.32; 'to:addr:python-list': 0.34; 'probably': 0.34; 'but': 0.37; 'received:google.com': 0.37; 'steven': 0.38; 'received:209.85': 0.38; 'hit': 0.40; 'received:209': 0.40; 'to:addr:python.org': 0.40; '2011': 0.61; 'your': 0.61; 'anywhere,': 0.73; '5:36': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=96YIBKiC3HVPu/ZIxtt3+S5bZY5Cdr4yPOqWevwqT5Y=; b=UNIFTz/ieTZMoT8e6c3zoAOIpOZ5anqZkzVW+xHOP2acpseZrXEVQGhIc4WUE1/60O xdKYJjxb1AztbaGEyqrE1j2XPr+sewOZZwi4gOEXaDg1sVrAZZ2wofdaAFSMCpsDv2lA pgYylcKWOQ1bRwn0jwxTen83Ca17qIZf2P3/A= MIME-Version: 1.0 In-Reply-To: <4ecde605$0$30003$c3e8da3$5496439d@news.astraweb.com> References: <4ecdba0c$0$30003$c3e8da3$5496439d@news.astraweb.com> <4ecde605$0$30003$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 24 Nov 2011 19:15:02 +1100 Subject: Re: Capturing SIGSTOP From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1322122505 news.xs4all.nl 6986 [2001:888:2000:d::a6]:45667 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16155 On Thu, Nov 24, 2011 at 5:36 PM, Steven D'Aprano wrote: > =A0 =A0os.kill(os.getpid(), signal.SIGSTOP) =A0# Hit myself with a brick. > > > It seems to work for me (on Linux), but is it the right way? And - if your system has SIGTSTP, it'll have SIGSTOP and this will be how it works. (Windows has neither.) This code will probably work fine on all modern Unix-like systems, but if it fails anywhere, it'll be for lack of SIGTSTP I would say. ChrisA