~/tmp/init.el:
(defun test-fn ()
""
(message "fuuuck!")
(when (and (daemonp) (string= server-name "server"))
(message "everything is ok"))
(message "yeah!"))
(add-hook 'after-init-hook 'test-fn)
emacs --fg-daemon=test --no-site-lisp --no-site-file --init-directory=~/tmp
@zrzz Oh, my bad, it's cause of server-name, not daemonp. Today it's me, not a compiler or os. (Still silently hanging).
I thought I tried it in isolation and only later added server-name 🤔