[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread STINNER Victor


STINNER Victor  added the comment:

You don't use properly ctypes. This issue is unrelated to signals. The fix is: 
HOOKFUNC = CFUNCTYPE(c_char_p,).

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread pmpp


pmpp  added the comment:

expected result would look like:

python3.6 -i -u -B pih.py
>>> Segmentation fault (core dumped)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread pmpp


pmpp  added the comment:

oops
 
use: python3 -i -u -B pih.py 
to run crash test

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread STINNER Victor


STINNER Victor  added the comment:

Can you please describe what happens and what is the expected behavior?

When I run "python3 pih.py", the script exits immediately and then a get many 
"kill: (5441) - No such process" errors in bash.

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread pmpp


New submission from pmpp :

when using PyOS_InputHook from within readline module
two signals are to be handled SIGINT and SIGWINCH
SIGINT is really usefull in case hook has a problem though in some case it 
should be nice to prevent it too (async loop in repl background) 

but SIGWINCH is an annoyance and often lead to interpreter crash.

sample file:
 linux crash test under ubuntu bionic python 3.7.1 gcc7

more elaborated test case https://github.com/pmp-p/aioprompt

--
components: Extension Modules
files: pih.py
messages: 329969
nosy: pmpp
priority: normal
severity: normal
status: open
title: readline.c: PyOS_InputHook not protected against SIGWINCH
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file47935/pih.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com