changeset 80981:f454fb9563fd

(init_sys_modes): Make gpm_fd nonblocking and allow it to be interrupted by SIGIO.
author Nick Roberts <nickrob@snap.net.nz>
date Sun, 20 May 2007 02:32:29 +0000
parents 51a9e0fd18ae
children 3b8b04d20e39
files src/sysdep.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/sysdep.c	Sun May 20 02:29:50 2007 +0000
+++ b/src/sysdep.c	Sun May 20 02:32:29 2007 +0000
@@ -1675,6 +1675,14 @@
       old_fcntl_owner = fcntl (input_fd, F_GETOWN, 0);
       fcntl (input_fd, F_SETOWN, getpid ());
       init_sigio (input_fd);
+#ifdef HAVE_GPM_H
+      if (term_gpm)
+	{
+	  fcntl (gpm_fd, F_SETOWN, getpid ());
+	  fcntl (gpm_fd, F_SETFL, O_NONBLOCK);
+	  init_sigio (gpm_fd);
+	}
+#endif /* HAVE_GPM_H */
     }
 #endif /* F_GETOWN */
 #endif /* F_SETOWN_BUG */