This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author telmich
Recipients eric.araujo, neologix, pitrou, poq, r.david.murray, telmich
Date 2012-11-08.14:21:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352384463.92.0.544429562626.issue14228@psf.upfronthosting.co.za>
In-reply-to
Content
I created two diffs to solve the problem:

a) a static late init of the signal handler
b) configurable late init (using python -z)

Both apply against latest mercurial code:

[15:20] brief:cpython% ./python -V
Python 3.4.0a0
[15:20] brief:cpython% ./python -h | grep -- -z
-z     : initialise signals after 'import site'
[15:20] brief:cpython% 


Using shellpart.sh (the original one) and using the newly compiled python binary (with -z), works fine:

[15:18] brief:python-traceback-test% ./shellpart.sh 
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
Indirect child being called
^C

It would be great if you apply either patch:

the static one is fine for me, but changes the behaviour => may not be suited for everyone. Otoh, it feels pretty clean to do a late signal change anyway.

the parameter based one lets the user choose whether to use traceback'd version or the "unix default" version -> choose this, if you want to ensure backwards compatibility.
History
Date User Action Args
2012-11-08 14:21:04telmichsetrecipients: + telmich, pitrou, eric.araujo, r.david.murray, neologix, poq
2012-11-08 14:21:03telmichsetmessageid: <1352384463.92.0.544429562626.issue14228@psf.upfronthosting.co.za>
2012-11-08 14:21:03telmichlinkissue14228 messages
2012-11-08 14:21:03telmichcreate