From a3b1a468318226d795e46d65d8c3c0b44942d6cc Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Thu, 4 Dec 2008 08:53:26 +0000 Subject: [PATCH] (kbd_buffer_get_event): Follow the non-interactive case when running as a daemon before detaching. --- src/ChangeLog | 5 +++++ src/keyboard.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index c410c70ae3f..016bba73911 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-12-04 Dan Nicolaescu + + * keyboard.c (kbd_buffer_get_event): Follow the non-interactive + case when running as a daemon before detaching. + 2008-12-03 Juanma Barranquero * w32.c (init_environment): Don't unload library shell32.dll. diff --git a/src/keyboard.c b/src/keyboard.c index f04ab9cf2e9..1d2f4eb7a9a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3978,7 +3978,10 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time) 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); -- 2.39.2