Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions contrib/win32/win32compat/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,6 @@ ConEnterRawMode()
ScrollBottom = ConVisibleWindowHeight();

in_raw_mode = 1;

/*
Consume and ignore the first WINDOW_BUFFER_SIZE_EVENT, as we've triggered it ourselves by updating the console settings above.
Not consuming this event can cause a race condition: the event can cause a write to the console to be printed twice as the
SIGWINCH interrupt makes the write operation think its failed, and causes it to try again.
*/
INPUT_RECORD peek_input;
int out_count = 0;
if (PeekConsoleInputW(GetConsoleInputHandle(), &peek_input, 1, &out_count) && peek_input.EventType == WINDOW_BUFFER_SIZE_EVENT) {
ReadConsoleInputW(GetConsoleInputHandle(), &peek_input, 1, &out_count);
}
}

/* Used to Uninitialize the Console */
Expand Down
6 changes: 3 additions & 3 deletions contrib/win32/win32compat/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ sw_process_pending_signals()
if (sigismember(&pending_tmp, exp[i])) {
if (sig_handlers[exp[i]] != W32_SIG_IGN) {
w32_raise(exp[i]);
/* dont error EINTR for SIG_ALRM, */
/* sftp client is not expecting it */
if (exp[i] != W32_SIGALRM)
/* don't set errno=EINTR on SIGALRM, sftp client is not expecting it */
/* don't set errno=EINTR on SIGWINCH in order to avoid breaking the sequence of waiting for completion of IO operations. */
if (exp[i] != W32_SIGALRM && exp[i] != W32_SIGWINCH)
sig_int = TRUE;
} else if (exp[i] == W32_SIGCHLD) /*if SIGCHLD is SIG_IGN, reap zombies*/
sw_cleanup_child_zombies();
Expand Down
Loading