[Tutor] UPDATE: Is there a 'hook' to capture all exits from a python program?
Cameron Simpson
cs at zip.com.au
Sat Mar 21 06:26:28 CET 2015
On 20Mar2015 19:20, Martin A. Brown <martin at linux-ip.net> wrote:
[...]
>Short version:
>(Apologies, Jack Nicholson, in demonic form or otherwise):
> * You can't 'handle': STOP, CONT, KILL, SEGV, BUS.
You can handle SEGV and BUS. Though probably not meaningfully in Python,
haven't tried; if they fire in Python something internal is already badly
wrong.
IIRC, in the distant past the Bourne shell used SIGSEGV as a trigger to
allocate more memory:-)
Really, the only 3 a UNIX process can't intercept are the first three: STOP,
CONT, KILL.
Since everything else Martin says seems to be in the context of "in Python", no
other quibbles.
Cheers,
Cameron Simpson <cs at zip.com.au>
More information about the Tutor
mailing list