Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9d0a6e42
Commit
9d0a6e42
authored
Sep 22, 2008
by
Juanma Barranquero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* emacs.c (Fdaemonp): Doc fix.
parent
9d29095c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
src/ChangeLog
src/ChangeLog
+5
-1
src/emacs.c
src/emacs.c
+9
-9
No files found.
src/ChangeLog
View file @
9d0a6e42
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>
...
...
src/emacs.c
View file @
9d0a6e42
...
...
@@ -1074,20 +1074,20 @@ main (int argc, char **argv)
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 @@ decode_env_path (evarname, defalt)
}
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment