From: Gerd Moellmann Date: Thu, 13 Sep 2001 14:05:17 +0000 (+0000) Subject: (current_lock_owner): If readlink returns ERANGE, X-Git-Tag: emacs-pretest-21.0.106~120 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b6e97b0af194bbee11d5f727618746e8125d3379;p=emacs.git (current_lock_owner): If readlink returns ERANGE, take that to mean that the buffer is too small. --- diff --git a/src/filelock.c b/src/filelock.c index 44db9722f91..6e78a05e309 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -436,6 +436,11 @@ current_lock_owner (owner, lfname) bufsize *= 2; lfinfo = (char *) xrealloc (lfinfo, bufsize); len = readlink (lfname, lfinfo, bufsize); +#ifdef ERANGE + /* HP-UX reports ERANGE if the buffer is too small. */ + if (len == -1 && errno == ERANGE) + continue; +#endif } while (len >= bufsize);