Skip to content

Commit

Permalink
win,signal: fix data race dispatching SIGWINCH
Browse files Browse the repository at this point in the history
The Event should be reset before reading the value, or libuv might miss
an update that occurred too rapidly after the previously one.

Refs: libuv#2381
Refs: libuv#4485
  • Loading branch information
vtjnash committed Aug 2, 2024
1 parent 4e310d0 commit 5b88864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/win/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -2380,8 +2380,8 @@ static DWORD WINAPI uv__tty_console_resize_watcher_thread(void* param) {
/* Make sure to not overwhelm the system with resize events */
Sleep(33);
WaitForSingleObject(uv__tty_console_resized, INFINITE);
uv__tty_console_signal_resize();
ResetEvent(uv__tty_console_resized);
uv__tty_console_signal_resize();
}
return 0;
}
Expand Down

0 comments on commit 5b88864

Please sign in to comment.