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.
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) * (Python triager) | 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) * (Python committer) | 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 type: behavior versions: + Python 2.6, - Python 2.4 nosy: + ajaksu2 messages: + msg87950 stage: test needed |
| 2008年09月23日 21:18:28 | shish | create | |