Capturing SIGSTOP
Chris Angelico
rosuav at gmail.com
Thu Nov 24 03:15:02 EST 2011
On Thu, Nov 24, 2011 at 5:36 PM, Steven D'Aprano
<steve+comp.lang.python at 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
More information about the Python-list
mailing list