mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-12 10:00:56 +01:00
31350: block SIGWINCH nearly all the time, except
when about to calculate prompts or do synchronous read, so syscalls are not interrupted by window size changes.
This commit is contained in:
parent
cbf6f144a9
commit
d19e18c68d
5 changed files with 28 additions and 0 deletions
|
|
@ -1291,6 +1291,13 @@ preprompt(void)
|
|||
int period = getiparam("PERIOD");
|
||||
int mailcheck = getiparam("MAILCHECK");
|
||||
|
||||
/*
|
||||
* Handle any pending window size changes before we compute prompts,
|
||||
* then block them again to avoid interrupts during prompt display.
|
||||
*/
|
||||
winch_unblock();
|
||||
winch_block();
|
||||
|
||||
if (isset(PROMPTSP) && isset(PROMPTCR) && !use_exit_printed && shout) {
|
||||
/* The PROMPT_SP heuristic will move the prompt down to a new line
|
||||
* if there was any dangling output on the line (assuming the terminal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue