changeset 100207:b8bed9009983

(kbd_buffer_get_event): Follow the non-interactive case when running as a daemon before detaching.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 04 Dec 2008 08:53:26 +0000
parents 0ae09d7be444
children c5f2603d7595
files src/ChangeLog src/keyboard.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Dec 04 07:03:53 2008 +0000
+++ b/src/ChangeLog	Thu Dec 04 08:53:26 2008 +0000
@@ -1,3 +1,8 @@
+2008-12-04  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* keyboard.c (kbd_buffer_get_event): Follow the non-interactive
+	case when running as a daemon before detaching.
+
 2008-12-03  Juanma Barranquero  <lekktu@gmail.com>
 
 	* w32.c (init_environment): Don't unload library shell32.dll.
--- a/src/keyboard.c	Thu Dec 04 07:03:53 2008 +0000
+++ b/src/keyboard.c	Thu Dec 04 08:53:26 2008 +0000
@@ -3978,7 +3978,10 @@
   register int c;
   Lisp_Object obj;
 
-  if (noninteractive)
+  if (noninteractive
+      /* In case we are running as a daemon, only do this before
+	 detaching from the terminal.  */
+      || (IS_DAEMON && daemon_pipe[1] >= 0))
     {
       c = getchar ();
       XSETINT (obj, c);