From: Dan Nicolaescu <dann@ics.uci.edu>
To: Adrian Robert <adrian.b.robert@gmail.com>
Cc: 1107@emacsbugs.donarmstrong.com
Subject: bug#1107: #1107 - 23.0.60; Emacs --daemon crashes when emacsclient tries to establish a connection on OS X - Emacs bug report logs
Date: Tue, 25 Nov 2008 12:34:51 -0800 (PST) [thread overview]
Message-ID: <200811252034.mAPKYpDa018369@mothra.ics.uci.edu> (raw)
In-Reply-To: <E104696A-503A-4A04-8F46-F7A3C2ABB9D6@gmail.com> (Adrian Robert's message of "Tue, 25 Nov 2008 15:08:31 -0500")
Adrian Robert <adrian.b.robert@gmail.com> writes:
> OK, it seems that the NS GUI stuff cannot be used in a child process
> from fork():
>
> http://developer.apple.com/ReleaseNotes/CoreFoundation/CoreFoundation.html
>
> (search for "fork"):
>
> > Due to the behavior of fork(), CoreFoundation cannot be used on the
> > child-side of fork(). If you fork(), you must follow that with an
> > exec*() call of some sort, and you should not use CoreFoundation
> > APIs within the child, before the exec*().
Bleah, how ugly. Do you know if this is also a problem if you never use
CoreFoundation (whatever that is) before the fork() call?
> I put in a really ugly hack that calls execve() in the child after the
> fork (which then means the daemonization has to be short-circuited the
> second time), and this works in all respects except:
>
> The emacsclient must be given "--socket-name /tmp/emacs503/server" to
> find the server. Else it gives "No socket or alternate editor."
>
> On the other hand, if I start emacs -Q and run 'server-start', this
> argument is NOT needed, and furthermore if it IS given it, it fails
> with "connect: Connection refused".
>
> Any insight into what is happening here?
What is (daemonp) returning? When using --daemon, if the value returned by
(daemonp) is a string is used to set `server-name', before calling
`server-start'.
So does emacs -Q -f server-start work now? (You reported problems in a
previous message...)
next prev parent reply other threads:[~2008-11-25 20:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-25 4:17 bug#1107: #1107 - 23.0.60; Emacs --daemon crashes when emacsclient tries to establish a connection on OS X - Emacs bug report logs Adrian Robert
2008-11-25 6:20 ` Dan Nicolaescu
2008-11-25 14:47 ` Adrian Robert
2008-11-25 15:27 ` Dan Nicolaescu
2008-11-25 20:08 ` Adrian Robert
2008-11-25 20:34 ` Dan Nicolaescu [this message]
2008-11-25 21:15 ` Adrian Robert
2008-11-25 21:24 ` Adrian Robert
-- strict thread matches above, loose matches on Subject: below --
2008-12-10 4:18 Adrian Robert
2008-12-10 6:58 ` Dan Nicolaescu
2008-12-10 15:27 ` Adrian Robert
2008-12-11 16:22 ` Stefan Monnier
2008-12-11 16:21 ` Stefan Monnier
2008-11-25 3:47 Adrian Robert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811252034.mAPKYpDa018369@mothra.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=1107@emacsbugs.donarmstrong.com \
--cc=adrian.b.robert@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).