summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2010-09-30 04:53:26 +0200
committerJuanma Barranquero <lekktu@gmail.com>2010-09-30 04:53:26 +0200
commit968ef9b4dae78c5badd7f377b26519c8840823e7 (patch)
tree295600dfe1afa8d91130d8adbb42c670e08d0cd7 /lib-src/emacsclient.c
parentcf16af423488fff17e43e5aca6fb76610284c1c3 (diff)
downloademacs-968ef9b4dae78c5badd7f377b26519c8840823e7.tar.gz
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/emacsclient.c')
-rw-r--r--lib-src/emacsclient.c13
1 files changed, 3 insertions, 10 deletions
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)
/*
* Read the information needed to set up a TCP comm channel with
- * the Emacs server: host, port, pid and authentication string.
+ * the Emacs server: host, port, and authentication string.
*/
int
get_server_config (struct sockaddr_in *server, char *authentication)
{
char dotted[32];
char *port;
- char *pid;
FILE *config = NULL;
if (file_name_absolute_p (server_file))
@@ -948,12 +947,8 @@ get_server_config (struct sockaddr_in *server, char *authentication)
return FALSE;
if (fgets (dotted, sizeof dotted, config)
- && (port = strchr (dotted, ':'))
- && (pid = strchr (port, ' ')))
- {
- *port++ = '\0';
- *pid++ = '\0';
- }
+ && (port = strchr (dotted, ':')))
+ *port++ = '\0';
else
{
message (TRUE, "%s: invalid configuration info\n", progname);
@@ -972,8 +967,6 @@ get_server_config (struct sockaddr_in *server, char *authentication)
fclose (config);
- emacs_pid = atoi (pid);
-
return TRUE;
}