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


Groups > comp.lang.python > #16155

Re: Capturing SIGSTOP

References <4ecdba0c$0$30003$c3e8da3$5496439d@news.astraweb.com> <mailman.2989.1322108547.27778.python-list@python.org> <4ecde605$0$30003$c3e8da3$5496439d@news.astraweb.com>
Date 2011-11-24 19:15 +1100
Subject Re: Capturing SIGSTOP
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2998.1322122505.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Nov 24, 2011 at 5:36 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
>    os.kill(os.getpid(), signal.SIGSTOP)  # 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

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


Thread

Capturing SIGSTOP Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-24 03:29 +0000
  Re: Capturing SIGSTOP Chris Angelico <rosuav@gmail.com> - 2011-11-24 15:22 +1100
    Re: Capturing SIGSTOP Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-24 06:36 +0000
      Re: Capturing SIGSTOP Chris Angelico <rosuav@gmail.com> - 2011-11-24 19:12 +1100
      Re: Capturing SIGSTOP Chris Angelico <rosuav@gmail.com> - 2011-11-24 19:15 +1100

csiph-web