mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-09 07:40:39 -08:00
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.
This commit is contained in:
parent
cf16af4234
commit
968ef9b4da
4 changed files with 17 additions and 14 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue