changeset 98294:d6ab37532b9b

* emacs.c (Fdaemonp): Doc fix.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 22 Sep 2008 15:21:40 +0000
parents 5286cdd20519
children a7da9fedfcf9
files src/ChangeLog src/emacs.c
diffstat 2 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Sep 22 12:42:50 2008 +0000
+++ b/src/ChangeLog	Mon Sep 22 15:21:40 2008 +0000
@@ -1,6 +1,10 @@
+2008-09-22  Juanma Barranquero  <lekktu@gmail.com>
+
+	* emacs.c (Fdaemonp): Doc fix.
+
 2008-09-22  Dan Nicolaescu  <dann@ics.uci.edu>
 
-	* emacs.c (main): Place #ifdef.in the proper place.
+	* emacs.c (main): Place #ifdef in the proper place.
 
 2008-09-21  Dan Nicolaescu  <dann@ics.uci.edu>
 
--- a/src/emacs.c	Mon Sep 22 12:42:50 2008 +0000
+++ b/src/emacs.c	Mon Sep 22 15:21:40 2008 +0000
@@ -1074,20 +1074,20 @@
   if (argmatch (argv, argc, "-daemon", "--daemon", 5, NULL, &skip_args))
     {
 #ifndef DOS_NT
-      pid_t f = fork();
+      pid_t f = fork ();
       int nfd;
       if (f > 0)
-	exit(0);
+	exit (0);
       if (f < 0)
 	{
 	  fprintf (stderr, "Cannot fork!\n");
-	  exit(1);
+	  exit (1);
 	}
 
-      nfd = open("/dev/null", O_RDWR);
-      dup2(nfd, 0);
-      dup2(nfd, 1);
-      dup2(nfd, 2);
+      nfd = open ("/dev/null", O_RDWR);
+      dup2 (nfd, 0);
+      dup2 (nfd, 1);
+      dup2 (nfd, 2);
       close (nfd);
       is_daemon = 1;
 #ifdef HAVE_SETSID
@@ -2383,8 +2383,8 @@
 }
 
 DEFUN ("daemonp", Fdaemonp, Sdaemonp, 0, 0, 0,
-       doc: /* Make the current emacs process a daemon.*/)
-  (void)
+       doc: /* Return t if the current emacs process is a daemon.  */)
+  ()
 {
   return is_daemon ? Qt : Qnil;
 }