diff options
| author | Paul Eggert | 2013-12-28 14:56:58 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-12-28 14:56:58 -0800 |
| commit | 411bf4a486ae5bfe32b8e10c6293f525905c0049 (patch) | |
| tree | 1cc7bb6c583a64f124b74d0c9f0314c06b5b255e | |
| parent | e9d6c46ab556fc08101b51dc11d82e2a1f0a42c4 (diff) | |
| download | emacs-411bf4a486ae5bfe32b8e10c6293f525905c0049.tar.gz emacs-411bf4a486ae5bfe32b8e10c6293f525905c0049.zip | |
Fix pipe bug with OS X emacs --daemon (Bug#16262).
* emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
flags on the daemon pipe ends before execing.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/emacs.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2749399d392..1ec84a72d2d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-12-28 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix pipe bug with OS X emacs --daemon (Bug#16262). | ||
| 4 | * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec | ||
| 5 | flags on the daemon pipe ends before execing. | ||
| 6 | |||
| 1 | 2013-12-28 Eli Zaretskii <eliz@gnu.org> | 7 | 2013-12-28 Eli Zaretskii <eliz@gnu.org> |
| 2 | 8 | ||
| 3 | * w32fns.c (Fx_create_frame): Error out if called from a TTY | 9 | * w32fns.c (Fx_create_frame): Error out if called from a TTY |
diff --git a/src/emacs.c b/src/emacs.c index 35e8ff330c9..b5bd3129ad2 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1099,6 +1099,8 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1099 | 1099 | ||
| 1100 | argv[skip_args] = fdStr; | 1100 | argv[skip_args] = fdStr; |
| 1101 | 1101 | ||
| 1102 | fcntl (daemon_pipe[0], F_SETFD, 0); | ||
| 1103 | fcntl (daemon_pipe[1], F_SETFD, 0); | ||
| 1102 | execvp (argv[0], argv); | 1104 | execvp (argv[0], argv); |
| 1103 | emacs_perror (argv[0]); | 1105 | emacs_perror (argv[0]); |
| 1104 | exit (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); | 1106 | exit (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); |