From patchwork Sun Oct 8 12:32:47 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Titz X-Patchwork-Id: 12395 Received: from quechua.inka.de ([193.197.184.2] helo=mail.inka.de ident=mail) by www.linuxtv.org with esmtp (Exim 4.50) id 1GWXu1-0003Fj-Rc for vdr@linuxtv.org; Sun, 08 Oct 2006 14:37:09 +0200 Received: from bigred.inka.de (uucp@) by mail.inka.de with local-bsmtp id 1GWXu0-00010q-UP; Sun, 08 Oct 2006 14:37:08 +0200 Received: from localhost by bigred.inka.de with local id 1GWXpn-0003Cc-00; Sun, 08 Oct 2006 14:32:47 +0200 To: vdr@linuxtv.org Organization: private Linux site, southern Germany Cc: From: Olaf Titz Date: Sun, 08 Oct 2006 14:32:47 +0200 Message-ID: Subject: [vdr] [PATCH] xineliboutput: keyboard read fix X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Oct 2006 12:37:09 -0000 Status: O X-Status: X-Keywords: X-UID: 10848 This trivial patch (for xineliboutput-1.0.0p5) fixes the situation with a remote frontend where stdin is not connected to a keyboard. The keyboard thread would not recognize an EOF condition (e.g. /dev/null) and spin at 100% CPU. (Same with pressing Ctrl-D I guess.) Perhaps the whole thing should just use -1 for EOF but that would need a fix in several places. Olaf === end of patch === --- xine_frontend_main.c~ 2006-10-08 13:02:46.000000000 +0200 +++ xine_frontend_main.c 2006-10-08 13:02:46.000000000 +0200 @@ -57,7 +57,7 @@ return -2; } } - return -1; + return 0xffff; } static uint64_t read_key_seq(void)