[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: |
Trent W. Buck |
Subject: |
bug#1058: 23.0.60; emacs --daemon should not return until socket is ready |
Date: |
Fri, 3 Oct 2008 08:42:38 +1000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Thu, Oct 02, 2008 at 05:32:32PM -0400, Stefan Monnier wrote:
> >> 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 ();
>
> Oh, thanks. I somehow overlooked it.
>
> > - 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.
>
> I see what you mean. But I think forking so early is wrong: all
> the --eval and .emacs processing should take place "in the foreground"
> with input/output from stdin/stdout (like --batch).
What happens if .emacs asks questions? Does 'emacs --daemon' require
a terminal?
Also, I'm currently using the following test to check whether the
running Emacs supports --daemon. If you break it, please make some
other test work.
emacs --batch -q --no-site-file --daemon &>/dev/null
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, (continued)
- 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
- 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/14
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/27
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready,
Trent W. Buck <=
- 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, Dan Nicolaescu, 2008/10/06
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Stefan Monnier, 2008/10/07
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/07
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Trent W. Buck, 2008/10/07
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Stefan Monnier, 2008/10/07
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Stefan Monnier, 2008/10/07
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Romain Francoise, 2008/10/07
- bug#1058: 23.0.60; emacs --daemon should not return until socket is ready, Dan Nicolaescu, 2008/10/07