(main): Always use /tmp and non-qualified hostname.

This commit is contained in:
Stefan Monnier 2002-09-27 22:07:38 +00:00
parent 15d40fa454
commit 3ecdcd5905
2 changed files with 7 additions and 11 deletions

View file

@ -6,6 +6,7 @@
(decode_options): Add -e and -d processing.
(print_help_and_exit): Update the usage string.
(main): Add support for --eval and --display.
(main): Always use /tmp and non-qualified hostname.
2002-09-25 Stefan Monnier <monnier@cs.yale.edu>

View file

@ -313,6 +313,7 @@ main (argc, argv)
server.sun_family = AF_UNIX;
{
char *dot;
system_name_length = 32;
while (1)
@ -328,9 +329,13 @@ main (argc, argv)
free (system_name);
system_name_length *= 2;
}
/* We always use the non-dotted host name, for simplicity. */
dot = index (system_name, '.');
if (dot)
*dot = '\0';
}
#ifndef SERVER_HOME_DIR
{
int sock_status = 0;
@ -387,16 +392,6 @@ main (argc, argv)
break;
}
}
#else
if ((homedir = getenv ("HOME")) == NULL)
{
fprintf (stderr, "%s: No home directory\n", argv[0]);
fail (argc, argv);
}
strcpy (server.sun_path, homedir);
strcat (server.sun_path, "/.emacs-server-");
strcat (server.sun_path, system_name);
#endif
if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2)
< 0)