telmich added the comment:

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.

----------
keywords: +patch
Added file: http://bugs.python.org/file27924/init_sigs_after_site_static.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14228>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to