Issue3949
Created on 2008-09-23 21:18 by shish, last changed 2022-04-11 14:56 by admin.
| Messages (4) | |||
|---|---|---|---|
| msg73668 - (view) | Author: Shish (shish) | Date: 2008-09-23 21:18 | |
after the first initscr() sigwinch is handled as expected, but then my app needs to ignore sigwinch, leave curses to view the output from something, come back into curses, and start listening for sigwinch again. The signal(SIGWINCH, SIG_IGN) call doesn't return the old, working signal handler; it returns 0 -- thus trying to re-set the signal handler doesn't work. (The reason for ignoring the signal is that if the window is resized while the external app is running, python's wait() is interrupted) Having the handler visible from python would also make curses play nicer with readline, as the app could mediate signal handling (see issue #3948) |
|||
| msg87950 - (view) | Author: Daniel Diniz (ajaksu2) * ![]() |
Date: 2009-05-17 02:42 | |
Shish, Can you provide a short test script? I think this might also be related to issue 1687125. |
|||
| msg88023 - (view) | Author: Shish (shish) | Date: 2009-05-18 09:41 | |
in its simplest form, this shows the bug -- signal.getsignal does not return the original signal handler (the "tell the app to resize itself" one that curses installs), and so, the original signal handler cannot be re-activated after being temporarily disabled ~~~~~~~~~~~~~~ import curses import signal curses.initscr() old_winch = signal.getsignal(signal.SIGWINCH) curses.endwin() print old_winch |
|||
| msg305419 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2017-11-02 11:42 | |
> The signal(SIGWINCH, SIG_IGN) call doesn't return the old, working signal handler; it returns 0 See bpo-13285: "signal module ignores external signal changes". By the way, I recently modified test_curses to save/restore signal handlers: see bpo-31629. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:39 | admin | set | github: 48199 |
| 2017-11-02 11:42:38 | vstinner | set | messages: + msg305419 |
| 2017-11-01 18:17:57 | serhiy.storchaka | set | nosy:
+ vstinner, serhiy.storchaka versions: + Python 3.6, Python 3.7, - Python 3.3, Python 3.4 |
| 2013-04-16 14:55:35 | r.david.murray | set | stage: test needed -> needs patch versions: + Python 2.7, Python 3.3, Python 3.4, - Python 2.6 |
| 2009-05-18 09:41:24 | shish | set | messages: + msg88023 |
| 2009-05-17 02:42:48 | ajaksu2 | set | priority: normal dependencies:
+ readline steals sigwinch messages:
+ msg87950 |
| 2008-09-23 21:18:28 | shish | create | |

