Subject: bug#1836: emacs -Q -fn "nonexistent" hangs

From: "Juanma Barranquero" <[email-masked]>
Date: Sat, 10 Jan 2009 04:26:20 +0100

On Sat, Jan 10, 2009 at 04:19, Jason Rumney <[email-masked]> wrote:

> Do we have a global flag to indicate that Emacs was started in daemon mode
> that we could use here?

There's a C function Fdaemonp, which uses IS_DAEMON, from lisp.h:

/* Pipe used to send exit notification to the daemon parent at
   startup.  */
extern int daemon_pipe[2];
#define IS_DAEMON (daemon_pipe[1] != 0)

    Juanma