Skip to content

Commit

Permalink
race condition: input thread must wait for curses_init() to complete
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Mar 14, 2024
1 parent 972ed49 commit 2be7c41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xpra/client/base/top_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import curses
import signal
import traceback
from time import monotonic
from time import monotonic, sleep
from subprocess import Popen, PIPE, DEVNULL
from datetime import datetime, timedelta
from typing import Dict, Tuple
Expand Down Expand Up @@ -473,6 +473,9 @@ def update_screen(self):
def input_thread(self):
self.log(f"input thread: signal handlers={signal.getsignal(signal.SIGINT)}")
while self.exit_code is None:
if not self.stdscr:
sleep(0.1)
continue
if not self.paused and self.modified:
self.stdscr.erase()
try:
Expand Down

0 comments on commit 2be7c41

Please sign in to comment.