[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#1058: 23.0.60; emacs --daemon should not return until socket is read
From: |
Dan Nicolaescu |
Subject: |
bug#1058: 23.0.60; emacs --daemon should not return until socket is ready |
Date: |
Thu, 2 Oct 2008 10:26:38 -0700 (PDT) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> >> > It would be much better if this could be done without a state
> >> > changing function callable from elisp.
> >> I agree, but given that control passes to Lisp pretty early, I don't
> >> see how it can be done.
> > That's exactly the reason for my initial reply...
> > Anyway, your patch probably needs an approval from a maintainer.
>
> I could accept a similar patch, maybe, but first I need to understand
> why/where we currently "detach" so early.
Where? in emacs.c:main, look for:
if (argmatch (argv, argc, "-daemon", "--daemon", 5, NULL, &skip_args))
{
#ifndef DOS_NT
pid_t f = fork ();
Why?
- mainly because I never thought about the emacs --daemon && emacsclient
use-case.
- in order to not make detaching an elisp function, and have to deal
with users trying to call it from different contexts
- the `fork' call for detaching needs to happen before some of the
initialization is run (although after my 2008-09-28 change it might be
possible to push it later), and also before .emacs is run and before
the server is started.
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, SRS0+wOMF+22+gmail . com=trentbuck, 2008/10/01
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/01
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Romain Francoise, 2008/10/01
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/01
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Romain Francoise, 2008/10/02
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/02
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Stefan Monnier, 2008/10/02
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready,
Dan Nicolaescu <=
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Stefan Monnier, 2008/10/02
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/02
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Trent W. Buck, 2008/10/02
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Stefan Monnier, 2008/10/02
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/03
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Stefan Monnier, 2008/10/03
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/03
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/12
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Stefan Monnier, 2008/10/13
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/13