public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] emacs r1167 - emacs-daemon
@ 2008-12-04 23:04 Ulrich Mueller (ulm)
  0 siblings, 0 replies; only message in thread
From: Ulrich Mueller (ulm) @ 2008-12-04 23:04 UTC (permalink / raw
  To: gentoo-commits

Author: ulm
Date: 2008-12-04 23:04:56 +0000 (Thu, 04 Dec 2008)
New Revision: 1167

Modified:
   emacs-daemon/ChangeLog
   emacs-daemon/emacs.rc
Log:
Call start-stop-daemon with --background option.

Modified: emacs-daemon/ChangeLog
===================================================================
--- emacs-daemon/ChangeLog	2008-12-03 07:05:06 UTC (rev 1166)
+++ emacs-daemon/ChangeLog	2008-12-04 23:04:56 UTC (rev 1167)
@@ -1,6 +1,7 @@
 2008-12-03  Ulrich Mueller  <ulm@gentoo.org>
 
 	* emacs.rc (checkconfig): Use numerical user id for root.
+	(start): Call start-stop-daemon with --background option.
 
 2008-11-30  Ulrich Mueller  <ulm@gentoo.org>
 

Modified: emacs-daemon/emacs.rc
===================================================================
--- emacs-daemon/emacs.rc	2008-12-03 07:05:06 UTC (rev 1166)
+++ emacs-daemon/emacs.rc	2008-12-04 23:04:56 UTC (rev 1167)
@@ -41,8 +41,12 @@
 
     ebegin "Starting Emacs daemon for ${USER}"
     eval home="~${USER}"
-    start-stop-daemon --start --user "${USER}" --chdir "${home}" \
-	--quiet --pidfile "${PIDFILE}" --env EMACS="${EMACS}" \
+
+    # Emacs detaches and exits the parent process only after loading the
+    # user's .emacs (initialisation). Anything may happen there, so we
+    # use --background to ensure that start-stop-daemon doesn't hang.
+    start-stop-daemon --start --user "${USER}" --chdir "${home}" --quiet \
+	--background --pidfile "${PIDFILE}" --env EMACS="${EMACS}" \
 	--exec "${EMACS_START:-${EMACS}}" -- --daemon ${EMACS_OPTS}
     eend $?
 }




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-04 23:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 23:04 [gentoo-commits] emacs r1167 - emacs-daemon Ulrich Mueller (ulm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox