def start_error_reader_thread
    @err_thread = Thread.new do
      begin
        read_loop
        $stderr.puts "stderr thread died!" if @debug