I installed emacs with homebrew and cask:
brew cask install emacs
It installed emacs 25.1.1.
I then linked the plist file to start emacs as a daemon on start up with:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.emacs.plist
I added the following exports:
export ALTERNATE_EDITOR=""
export EDITOR="emacsclient -t"terminal
export VISUAL="emacsclient -c -a emacs"
I have the following aliases:
alias em="emacsclient -t"
alias emax="emacsclient -c -a emacs"
The first one will open emacs in the terminal window and works fine but the second alias which I thought would open the GUI.
It does open the Gui but the terminal window is holding onto the process until I close the Guid down at which point it kills the emacs process and the daemon.
It displays the following text:
Waiting for Emacs...
How can I open the GUI in a new process and shut it down without killing the daemon?