This repository was archived by the owner on Feb 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -216,10 +216,11 @@ tty_got_winch (void)
216216
217217/* --------------------------------------------------------------------------------------------- */
218218
219- void
219+ gboolean
220220tty_flush_winch (void )
221221{
222222 ssize_t n ;
223+ gboolean ret = FALSE;
223224
224225 /* merge all SIGWINCH events raised to this moment */
225226 do
@@ -228,8 +229,14 @@ tty_flush_winch (void)
228229
229230 /* read multiple events at a time */
230231 n = read (sigwinch_pipe [0 ], & x , sizeof (x ));
232+
233+ /* at least one SIGWINCH came */
234+ if (n > 0 )
235+ ret = TRUE;
231236 }
232237 while (n > 0 || (n == -1 && errno == EINTR ));
238+
239+ return ret ;
233240}
234241
235242/* --------------------------------------------------------------------------------------------- */
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ extern void tty_disable_interrupt_key (void);
8181extern gboolean tty_got_interrupt (void );
8282
8383extern gboolean tty_got_winch (void );
84- extern void tty_flush_winch (void );
84+ extern gboolean tty_flush_winch (void );
8585
8686extern void tty_reset_prog_mode (void );
8787extern void tty_reset_shell_mode (void );
You can’t perform that action at this time.
0 commit comments