Interesting, thanks. Yes it's the same issue.

(or noninteractive
    (and (daemonp)
         (null (cdr (frame-list)))
         (eq (selected-frame) terminal-frame)))

On 26 November 2013 23:33, Glenn Morris <rgm@gnu.org> wrote:
Constantin Kulikov wrote:

> It could be useful in case when you start emacs --daemon from startup
> script and your elisp code intended to ask yes-or-no -- then emacs
> --daemon will stuck,

I'm not sure what you are saying/proposing, but it sounds somewhat like
http://debbugs.gnu.org/13697