From: Mike McCormack <mj.mccormack@samsung.com>
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 24 Jan 2011 01:58:08 +0000 (01:58 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 24 Jan 2011 01:58:08 +0000 (01:58 +0000)
The ecore_fb keyboard code may end up closing stdin.
The attached patch fixes this bug.

thanks,

Mike

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@56274 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_fb/ecore_fb_kbd.c

index 5d2a6a6..8dcd29d 100644 (file)
@@ -121,7 +121,7 @@ static const char *_ecore_fb_btn_syms[128] =
      "0x7e", 
      "0x7f"
 };
-static int _ecore_fb_kbd_fd = 0;
+static int _ecore_fb_kbd_fd = -1;
 static int _ecore_fb_ctrl = 0;
 static int _ecore_fb_alt = 0;
 static int _ecore_fb_shift = 0;
@@ -296,7 +296,7 @@ ecore_fb_kbd_shutdown(void)
    if (_ecore_fb_kbd_fd_handler_handle) 
       ecore_main_fd_handler_del(_ecore_fb_kbd_fd_handler_handle);
    if (_ecore_fb_kbd_fd >= 0) close(_ecore_fb_kbd_fd);
-   _ecore_fb_kbd_fd = 0;
+   _ecore_fb_kbd_fd = -1;
    _ecore_fb_kbd_fd_handler_handle = NULL;
    _ecore_fb_ctrl = 0;
    _ecore_fb_lock = 0;