Josh Rosenberg added the comment:

Patch doesn't let me comment, but I believe to be strictly standards 
conformant, sigwinch_received should be declared as a `volatile sig_atomic_t`, 
not `char`. See: 
https://www.securecoding.cert.org/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers

Also, to close an incredibly narrow race window, I believe sigwinch_received 
should be set to zero before calling rl_resize_terminal(), on the theory that 
otherwise, the signal could be received just after the call, but before setting 
the flag to 0, the signal handler would set it to 1, but we'd promptly squash 
that by setting it back to 0 (even though a resize occurred that should be 
handled).

----------
nosy: +josh.r

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

Reply via email to