Mercurial > emacs
changeset 470:db84d8d9a1d9
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 21 Dec 1991 07:03:14 +0000 |
parents | ffa6d5c9b074 |
children | 259595b59f93 |
files | lib-src/emacsserver.c src/bytecode.c |
diffstat | 2 files changed, 15 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/emacsserver.c Sat Dec 21 06:36:41 1991 +0000 +++ b/lib-src/emacsserver.c Sat Dec 21 07:03:14 1991 +0000 @@ -59,6 +59,7 @@ main () { + char system_name[32]; int s, infd, fromlen; struct sockaddr_un server, fromunix; char *homedir; @@ -85,21 +86,27 @@ exit (1); } server.sun_family = AF_UNIX; - homedir = getenv ("HOME"); - if (homedir == NULL) +#ifndef SERVER_HOME_DIR + gethostname (system_name, sizeof (system_name)); + sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name); + + if (unlink (server.sun_path) == -1 && errno != ENOENT) + { + perror ("unlink"); + exit (1); + } +#else + if ((homedir = getenv ("HOME")) == NULL) { fprintf (stderr,"No home directory\n"); exit (1); } - sprintf (server.sun_path, "/tmp/esrv%d", geteuid ()); - -#if 0 strcpy (server.sun_path, homedir); strcat (server.sun_path, "/.emacs_server"); + /* Delete anyone else's old server. */ + unlink (server.sun_path); #endif - /* Delete anyone else's old server. */ - unlink (server.sun_path); if (bind (s, &server, strlen (server.sun_path) + 2) < 0) { perror ("bind"); @@ -294,6 +301,7 @@ if ((fromlen = msgrcv (s, msgp, BUFSIZ - 1, 1, 0)) < 0) { perror ("msgrcv"); + exit (1); } else {
--- a/src/bytecode.c Sat Dec 21 06:36:41 1991 +0000 +++ b/src/bytecode.c Sat Dec 21 07:03:14 1991 +0000 @@ -418,14 +418,7 @@ } } #endif - /* The frobbing of gcpro3 was lost by jwz's changes in June 91 - and then reinserted by jwz in Nov 91. */ - /* Remove protection from the args we are giving to Ffuncall. - FFuncall will protect them, and double protection would - cause disasters. */ - gcpro3.nvars = &TOP - stack - 1; TOP = Ffuncall (op + 1, &TOP); - gcpro3.nvars = XFASTINT (maxdepth); break; case Bunbind+6: