HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
51e473c
)
(main): Restore errno from saved_errno,
author
Richard M. Stallman
<rms@gnu.org>
Sat, 24 Jan 2004 21:57:57 +0000
(21:57 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Sat, 24 Jan 2004 21:57:57 +0000
(21:57 +0000)
so the error message comes from socket_status.
lib-src/emacsclient.c
patch
|
blob
|
blame
|
history
diff --git
a/lib-src/emacsclient.c
b/lib-src/emacsclient.c
index
49ebada
..
3ae33f7
100644
(file)
--- a/
lib-src/emacsclient.c
+++ b/
lib-src/emacsclient.c
@@
-388,12
+388,14
@@
main (argc, argv)
that init_editfns uses to set the global Vuser_full_name. */
char *user_name = (char *) getenv ("LOGNAME");
+
if (!user_name)
user_name = (char *) getenv ("USER");
if (user_name)
{
struct passwd *pw = getpwnam (user_name);
+
if (pw && (pw->pw_uid != geteuid ()))
{
/* We're running under su, apparently. */
@@
-412,6
+414,8
@@
main (argc, argv)
sock_status = socket_status (server.sun_path);
saved_errno = errno;
}
+ else
+ errno = saved_errno;
}
}