diff options
| author | Juanma Barranquero | 2010-09-30 04:53:26 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-09-30 04:53:26 +0200 |
| commit | 968ef9b4dae78c5badd7f377b26519c8840823e7 (patch) | |
| tree | 295600dfe1afa8d91130d8adbb42c670e08d0cd7 /lib-src | |
| parent | cf16af423488fff17e43e5aca6fb76610284c1c3 (diff) | |
| download | emacs-968ef9b4dae78c5badd7f377b26519c8840823e7.tar.gz emacs-968ef9b4dae78c5badd7f377b26519c8840823e7.zip | |
lisp/server.el: Use just one way to pass the Emacs PID to emacsclient.
* lib-src/emacsclient.c (get_server_config): Don't read Emacs pid from
the authentication file.
* lisp/server.el (server-start): Don't write pid to the authentication file.
(server-create-tty-frame): Don't send pid.
(server-process-filter): Send pid at the start of every connection.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 5 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 13 |
2 files changed, 8 insertions, 10 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 2c386257c10..33036c92ffd 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-09-30 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * emacsclient.c (get_server_config): Don't read Emacs pid from | ||
| 4 | the authentication file. | ||
| 5 | |||
| 1 | 2010-09-29 Juanma Barranquero <lekktu@gmail.com> | 6 | 2010-09-29 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * makefile.w32-in (../src/config.h): Remove target, it is stale. | 8 | * makefile.w32-in (../src/config.h): Remove target, it is stale. |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 1f96c481129..4d8a835e56d 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -910,14 +910,13 @@ initialize_sockets (void) | |||
| 910 | 910 | ||
| 911 | /* | 911 | /* |
| 912 | * Read the information needed to set up a TCP comm channel with | 912 | * Read the information needed to set up a TCP comm channel with |
| 913 | * the Emacs server: host, port, pid and authentication string. | 913 | * the Emacs server: host, port, and authentication string. |
| 914 | */ | 914 | */ |
| 915 | int | 915 | int |
| 916 | get_server_config (struct sockaddr_in *server, char *authentication) | 916 | get_server_config (struct sockaddr_in *server, char *authentication) |
| 917 | { | 917 | { |
| 918 | char dotted[32]; | 918 | char dotted[32]; |
| 919 | char *port; | 919 | char *port; |
| 920 | char *pid; | ||
| 921 | FILE *config = NULL; | 920 | FILE *config = NULL; |
| 922 | 921 | ||
| 923 | if (file_name_absolute_p (server_file)) | 922 | if (file_name_absolute_p (server_file)) |
| @@ -948,12 +947,8 @@ get_server_config (struct sockaddr_in *server, char *authentication) | |||
| 948 | return FALSE; | 947 | return FALSE; |
| 949 | 948 | ||
| 950 | if (fgets (dotted, sizeof dotted, config) | 949 | if (fgets (dotted, sizeof dotted, config) |
| 951 | && (port = strchr (dotted, ':')) | 950 | && (port = strchr (dotted, ':'))) |
| 952 | && (pid = strchr (port, ' '))) | 951 | *port++ = '\0'; |
| 953 | { | ||
| 954 | *port++ = '\0'; | ||
| 955 | *pid++ = '\0'; | ||
| 956 | } | ||
| 957 | else | 952 | else |
| 958 | { | 953 | { |
| 959 | message (TRUE, "%s: invalid configuration info\n", progname); | 954 | message (TRUE, "%s: invalid configuration info\n", progname); |
| @@ -972,8 +967,6 @@ get_server_config (struct sockaddr_in *server, char *authentication) | |||
| 972 | 967 | ||
| 973 | fclose (config); | 968 | fclose (config); |
| 974 | 969 | ||
| 975 | emacs_pid = atoi (pid); | ||
| 976 | |||
| 977 | return TRUE; | 970 | return TRUE; |
| 978 | } | 971 | } |
| 979 | 972 | ||