# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1152693445 0 # Node ID fb57c183078864ac6cceb9c5c21b56349d2afb00 # Parent 0b0685327de8aa3a49bb4ed3c95e83996eb34a64 Include blockinput.h. (Fuser_login_name, Fuser_full_name): Add BLOCK_INPUT around getpwuid/getpwnam. diff -r 0b0685327de8 -r fb57c1830788 src/editfns.c --- a/src/editfns.c Wed Jul 12 08:37:07 2006 +0000 +++ b/src/editfns.c Wed Jul 12 08:37:25 2006 +0000 @@ -56,6 +56,7 @@ #include "coding.h" #include "frame.h" #include "window.h" +#include "blockinput.h" #ifdef STDC_HEADERS #include @@ -1302,7 +1303,9 @@ 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 @@ 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");