summaryrefslogtreecommitdiff
path: root/src/editfns.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2006-07-12 08:37:25 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2006-07-12 08:37:25 +0000
commitb91834c328d3b310e3ebb7094c926e3f4787f07b (patch)
treeadc8c27087d73bdefdfb9494f2cc4399cbd3f4ae /src/editfns.c
parent8c8a7c58e3d8c25a2acedf7af34c627850736dc1 (diff)
downloademacs-b91834c328d3b310e3ebb7094c926e3f4787f07b.tar.gz
Include blockinput.h.
(Fuser_login_name, Fuser_full_name): Add BLOCK_INPUT around getpwuid/getpwnam.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/editfns.c b/src/editfns.c
index cbaf1bb18ac..0761abd8d52 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -56,6 +56,7 @@ Boston, MA 02110-1301, USA. */
#include "coding.h"
#include "frame.h"
#include "window.h"
+#include "blockinput.h"
#ifdef STDC_HEADERS
#include <float.h>
@@ -1302,7 +1303,9 @@ with that uid, or nil if there is no such user. */)
return Vuser_login_name;
CHECK_NUMBER (uid);
+ BLOCK_INPUT;
pw = (struct passwd *) getpwuid (XINT (uid));
+ UNBLOCK_INPUT;
return (pw ? build_string (pw->pw_name) : Qnil);
}
@@ -1356,9 +1359,17 @@ name, or nil if there is no such user. */)
if (NILP (uid))
return Vuser_full_name;
else if (NUMBERP (uid))
- pw = (struct passwd *) getpwuid ((uid_t) XFLOATINT (uid));
+ {
+ BLOCK_INPUT;
+ pw = (struct passwd *) getpwuid ((uid_t) XFLOATINT (uid));
+ UNBLOCK_INPUT;
+ }
else if (STRINGP (uid))
- pw = (struct passwd *) getpwnam (SDATA (uid));
+ {
+ BLOCK_INPUT;
+ pw = (struct passwd *) getpwnam (SDATA (uid));
+ UNBLOCK_INPUT;
+ }
else
error ("Invalid UID specification");