File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ def _nonblocking_write_to_stdout(messages: Iterable[str]) -> None:
436436 _WRITE_QUEUE_SIZE = 1000
437437 _WATCHDOG_TIMEOUT_S = 600
438438 write_queue : queue .Queue [Optional [bytes ]] = queue .Queue (maxsize = _WRITE_QUEUE_SIZE )
439- writer_error : List [BaseException ] = []
439+ writer_error : List [Exception ] = []
440440
441441 def _stdout_writer () -> None :
442442 """Dedicated thread that writes queued messages to stdout."""
@@ -449,7 +449,9 @@ def _stdout_writer() -> None:
449449 while total < len (data ):
450450 written = os .write (real_fd , data [total :])
451451 total += written
452- except BaseException as exc :
452+ except (KeyboardInterrupt , SystemExit ):
453+ raise
454+ except Exception as exc :
453455 writer_error .append (exc )
454456
455457 writer = threading .Thread (target = _stdout_writer , name = "stdout-writer" , daemon = True )
You can’t perform that action at this time.
0 commit comments