Fix 'send-string-to-terminal' writing very long strings
* src/dispnew.c (Fsend_string_to_terminal): Prevent partial writes by blocking SIGIO while 'fwrite' runs. (Bug#44320)
This commit is contained in:
parent
9da0f4026c
commit
d4242177da
1 changed files with 4 additions and 0 deletions
|
@ -5904,8 +5904,12 @@ when TERMINAL is nil. */)
|
|||
}
|
||||
out = tty->output;
|
||||
}
|
||||
/* STRING might be very long, in which case fwrite could be
|
||||
interrupted by SIGIO. So we temporarily block SIGIO. */
|
||||
unrequest_sigio ();
|
||||
fwrite (SDATA (string), 1, SBYTES (string), out);
|
||||
fflush (out);
|
||||
request_sigio ();
|
||||
unblock_input ();
|
||||
return Qnil;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue