# HG changeset patch # User Dan Nicolaescu # Date 1228380806 0 # Node ID b8bed90099830e1dc5c8275d7abb7ea92d29e9bb # Parent 0ae09d7be4440169be5df164efe742127e8c5773 (kbd_buffer_get_event): Follow the non-interactive case when running as a daemon before detaching. diff -r 0ae09d7be444 -r b8bed9009983 src/ChangeLog --- 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 + + * 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 -r 0ae09d7be444 -r b8bed9009983 src/keyboard.c --- 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);